Questions tagged [brightness]

An attribute of visual perception in which a source appears to be radiating or reflecting light.

Brightness is an attribute of visual perception in which a source appears to be radiating or reflecting light. In other words, brightness is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being observed.

450 questions
48
votes
16 answers

Change the System Brightness Programmatically

I want to change the system brightness programmatically. For that purpose I am using this code: WindowManager.LayoutParams lp = window.getAttributes(); lp.screenBrightness = (255); window.setAttributes(lp); because I heard that max value is…
Usman Riaz
  • 2,720
  • 6
  • 40
  • 64
47
votes
12 answers

JavaScript Calculate brighter colour

I have a colour value in JS as a string #ff0000 How would I go about programatically calculating a brighter/lighter version of this colour, for example #ff4848, and be able to calculate the brightness via a percentage,…
Ozzy
  • 9,483
  • 25
  • 86
  • 132
31
votes
6 answers

Hex Code Brightness PHP?

I want users on my website to be able to pick a hex colour, and I just want to display white text for dark colours and black text for light colours. Can you work out the brightness from a hex code (preferably PHP)?
Juddling
  • 4,137
  • 6
  • 29
  • 38
30
votes
5 answers

Changing screen brightness programmatically (as with the power widget)

I was searching how to change the brightness of the screen programmatically and I found this it is very good solution and it works nice, but it works only while my app is active. After my application is shutdown then the brightness is returned back…
Lukap
  • 29,596
  • 60
  • 146
  • 239
28
votes
7 answers

Change brightness of background-image?

I am wondering if it is possible to change the brightness of: body{ background-image:url(); } Using HTML/CSS. The reason I would like to change it, is because I just spent a rather long time making the image, but when I put it on website, it is…
user3227878
  • 337
  • 1
  • 3
  • 8
27
votes
6 answers

applicationWillResignActive and setBrightness not working?

I use [[UIScreen mainScreen]setBrightness: ] (in sdk 5.0) to change the system background light in my app. The following steps work with my app: Active the app, get the system brightness as default, then save as sysBright. Change the brightness…
Adam Waite
  • 19,748
  • 19
  • 120
  • 146
20
votes
9 answers

How to change the Monitor brightness on Linux?

How do I programmatically change the monitor brightness on Linux? I'm using SLES 11.
Alexander Stolz
  • 7,116
  • 11
  • 54
  • 63
20
votes
2 answers

Get preferred screen brightness in Android

How do you get the preferred screen brightness in Android? To change the screen brightness I use WindowManager.LayoutParams.screenBrightness. According to the documentation: This can be used to override the user's preferred brightness of the …
hpique
  • 112,774
  • 126
  • 328
  • 461
19
votes
4 answers

How to change brightness in iOS 5 app?

How would I program the ability to change brightness in-app? I know that its possible as I have seen at least three apps that can do it. This would be very useful for my app. I know that it's only possible in iOS 5 with the UIScreen Class, but I…
cory ginsberg
  • 2,888
  • 6
  • 22
  • 36
17
votes
4 answers

Brightness Screen Filter

Does anyone have an idea how to implement an Brightness Screen Filter like the one here: http://www.appbrain.com/app/screen-filter/com.haxor I need a starting point and I can't figure out how to do it.
Alex
  • 2,153
  • 4
  • 29
  • 43
17
votes
7 answers

Arch (xbacklight): No outputs have backlight property

I have two folders in my /sys/class/backlight: 1> acpi_video0 2> intel_backlight The intel_backlight is useless because I can use the following command to adjust brightness in acpi_video0 (I'm running Nvidia drivers): e.g: echo 50 >…
catharchy
  • 191
  • 1
  • 1
  • 6
16
votes
1 answer

python -- measuring pixel brightness

How can I get a measure for a pixels brightness for a specific pixel in an image? I'm looking for an absolute scale for comparing different pixels' brightness. Thanks
Double AA
  • 5,019
  • 15
  • 40
  • 53
16
votes
4 answers

Programmatically change Mac display brightness

How to change Mac display brightness from cocoa application?
tig
  • 21,082
  • 10
  • 60
  • 93
15
votes
1 answer

Adjust brightness contrast and gamma of an image

What is an easy way to adjust brightness contrast and gamma of an Image in .NET Will post the answer myself to find it later.
VladL
  • 11,959
  • 10
  • 58
  • 82
14
votes
4 answers

Can't apply system screen brightness programmatically in Android

I'm using the following to set the system auto brightness mode and level: android.provider.Settings.System.putInt(y.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS_MODE, 0); …
user496854
  • 4,639
  • 9
  • 39
  • 74
1
2 3
29 30