FastLED
3.9.15
Loading...
Searching...
No Matches
◆
applyGamma_video()
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
}
brightness
UISlider brightness("Brightness", 255, 0, 255, 1)
colorutils.h
Generated on Thu Jun 5 2025 04:29:39 for FastLED by
1.13.2