2016-03-25 16:47:20 -07:00
# Brightness
2016-06-14 12:12:26 -07:00
Find how bright the [LED screen ](/device/screen ) is _when it is turned on_ .
2016-03-25 16:47:20 -07:00
```sig
led.brightness();
```
### Returns
2017-03-16 07:57:41 -07:00
* a [number ](/types/number ) that means how bright the screen is when it is turned on, from `0` (darkest) to `255` (brightest). For example, the number `127` means the screen is halfway bright when it is turned on.
2016-03-25 16:47:20 -07:00
2016-05-23 18:02:40 -07:00
### Example: highest brightness
2016-03-25 16:47:20 -07:00
2016-06-14 12:12:26 -07:00
This program makes the screen completely bright when it is turned on (if it is not that way already):
2016-03-25 16:47:20 -07:00
```blocks
if (led.brightness() < 255 ) {
led.setBrightness(255)
}
```
2016-06-14 12:51:21 -07:00
### Example: change brightness
This program makes the screen brightness 100% (255). Then it turns on
the center LED (`2, 2` ), waits for one second and then sets the screen
brightness to 50% (128):
```blocks
led.setBrightness(255)
led.plot(2, 2)
basic.pause(1000)
led.setBrightness(led.brightness() / 2)
```
2016-03-25 16:47:20 -07:00
### See also
2016-04-13 08:27:45 -07:00
[set brightness ](/reference/led/set-brightness ), [fade in ](/reference/led/fade-in ), [fade out ](/reference/led/fade-out )
2016-03-25 16:47:20 -07:00