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

◆ subtractFromRGB()

FASTLED_FORCE_INLINE CRGB & CRGB::subtractFromRGB ( fl::u8 d)

Subtract a constant from each channel, saturating at 0x00.

Note
This is NOT an operator+= overload because the compiler can't usefully decide when it's being passed a 32-bit constant (e.g. CRGB::Red) and an 8-bit one (CRGB::Blue)

Definition at line 56 of file crgb.hpp.

57{
58 r = fl::qsub8( r, d);
59 g = fl::qsub8( g, d);
60 b = fl::qsub8( b, d);
61 return *this;
62}

References CRGB(), FASTLED_FORCE_INLINE, and FL_NOEXCEPT.

Referenced by operator--().

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