Maximize the brightness of this CRGB object.
This makes the individual color channels as bright as possible while keeping the same value differences between channels.
- Note
- This does not keep the same ratios between channels, just the same difference in absolute values.
Definition at line 455 of file crgb.h.
455 {
457 if( green > max) max = green;
458 if( blue > max) max = blue;
459
460
461 if(max > 0) {
462 fl::u16 factor = ((fl::u16)(limit) * 256) / max;
463 red = (red * factor) / 256;
464 green = (green * factor) / 256;
465 blue = (blue * factor) / 256;
466 }
467 }
References FASTLED_FORCE_INLINE.