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

◆ nscale8_video()

FASTLED_FORCE_INLINE CRGB & CRGB::nscale8_video ( fl::u8 scaledown)

Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.

"Video" dimming rules means that unless the scale factor is ZERO each channel is guaranteed NOT to dim down to zero. If it's already nonzero, it'll stay nonzero, even if that means the hue shifts a little at low brightness levels.

Note
For array operations with many pixels, use nscale8_video(CRGB*, size_t, u8) from fl/colorutils.h instead, which is optimized for bulk scaling and can be 2-4x faster than per-pixel scaling due to compiler optimizations and register reuse patterns.
See also
nscale8x3_video
Examples
TwinkleFox.ino.

Definition at line 72 of file crgb.hpp.

73{
74 nscale8x3_video( r, g, b, scaledown);
75 return *this;
76}

References CRGB(), FASTLED_FORCE_INLINE, and FL_NOEXCEPT.

Referenced by fl::TwinkleFox::drawTwinkleFox(), drawTwinkles(), FL_DISABLE_WARNING(), and fl::operator%().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: