4#define FASTLED_INTERNAL
26 #if defined(NO_CORRECTION) && (NO_CORRECTION==1)
31 for(uint8_t i = 0; i < 3; ++i) {
32 uint8_t cc = colorCorrection.raw[i];
33 uint8_t ct = colorTemperature.raw[i];
34 if(cc > 0 && ct > 0) {
37 uint32_t work = (((uint16_t)cc)+1);
38 work *= (((uint16_t)ct)+1);
41 adj.raw[i] = work & 0xFF;
52 blend8(p1.r, p2.r, amountOfP2),
53 blend8(p1.g, p2.g, amountOfP2),
54 blend8(p1.b, p2.b, amountOfP2)
60 uint8_t max_component = 0;
61 for (
int i = 0; i < 3; ++i) {
62 if (upper.raw[i] > max_component) {
63 max_component = upper.raw[i];
68 uint8_t amountOf2 = 255 - max_component;
central include file for FastLED, defines the CFastLED class/object
UISlider scale("Scale", 4,.1, 4,.1)
Str & append(const char *str)
Defines the red, green, and blue (RGB) pixel struct.
uint8_t fract8
ANSI: unsigned short _Fract.
LIB8STATIC uint8_t blend8(uint8_t a, uint8_t b, uint8_t amountOfB)
Blend a variable proportion (0-255) of one byte to another.
LIB8STATIC void nscale8x3(uint8_t &r, uint8_t &g, uint8_t &b, fract8 scale)
Scale three one-byte values by a fourth one, which is treated as the numerator of a fraction whose de...
Fast, efficient 8-bit math functions specifically designed for high-performance LED programming.
#define FASTLED_NAMESPACE_END
Implements the FastLED namespace macros.
FASTLED_FORCE_INLINE CRGB()=default
Default constructor.
CRGB & nscale8(uint8_t scaledown)
Scale down a RGB to N/256ths of its current brightness, using "plain math" dimming rules.
static CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
static CRGB computeAdjustment(uint8_t scale, const CRGB &colorCorrection, const CRGB &colorTemperature)
Calculates the combined color adjustment to the LEDs at a given scale, color correction,...
static CRGB blendAlphaMaxChannel(const CRGB &upper, const CRGB &lower)