FastLED 3.9.15
Loading...
Searching...
No Matches

◆ applyGamma_video() [3/3]

uint8_t fl::applyGamma_video ( uint8_t brightness,
float gamma )

Definition at line 1056 of file colorutils.cpp.

1056 {
1057 float orig;
1058 float adj;
1059 orig = (float)(brightness) / (255.0);
1060 adj = pow(orig, gamma) * (255.0);
1061 uint8_t result = (uint8_t)(adj);
1062 if ((brightness > 0) && (result == 0)) {
1063 result = 1; // never gamma-adjust a positive number down to zero
1064 }
1065 return result;
1066}
UISlider brightness("Brightness", 255, 0, 255, 1)

References brightness.

Referenced by applyGamma_video(), applyGamma_video(), napplyGamma_video(), napplyGamma_video(), napplyGamma_video(), and napplyGamma_video().

+ Here is the caller graph for this function: