FastLED  3.1
Dimming and brightening functions

Dimming and brightening functions. More...

Functions

LIB8STATIC uint8_t dim8_raw (uint8_t x)
 Adjust a scaling value for dimming.
 
LIB8STATIC uint8_t dim8_video (uint8_t x)
 Adjust a scaling value for dimming for video (value will never go below 1)
 
LIB8STATIC uint8_t dim8_lin (uint8_t x)
 Linear version of the dimming function that halves for values < 128.
 
LIB8STATIC uint8_t brighten8_raw (uint8_t x)
 inverse of the dimming function, brighten a value
 
LIB8STATIC uint8_t brighten8_video (uint8_t x)
 inverse of the dimming function, brighten a value
 
LIB8STATIC uint8_t brighten8_lin (uint8_t x)
 inverse of the dimming function, brighten a value
 

Detailed Description

Dimming and brightening functions.

The eye does not respond in a linear way to light. High speed PWM'd LEDs at 50% duty cycle appear far brighter then the 'half as bright' you might expect.

If you want your midpoint brightness leve (128) to appear half as bright as 'full' brightness (255), you have to apply a 'dimming function'.