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

◆ rgb_2_rgbw_max_brightness()

void rgb_2_rgbw_max_brightness ( uint16_t w_color_temperature,
uint8_t r,
uint8_t g,
uint8_t b,
uint8_t r_scale,
uint8_t g_scale,
uint8_t b_scale,
uint8_t * out_r,
uint8_t * out_g,
uint8_t * out_b,
uint8_t * out_w )

The minimum brigthness of the RGB channels is used to set the W channel.

This will allow the max brightness of the led chipset to be used. However the leds will appear over-desaturated in this mode.

RGB(255, 255, 255) -> RGBW(255, 255, 255, 255)
RGB(1, 0, 0) -> RGBW(1, 0, 0, 1)
@ RGB
Red, Green, Blue (0012)
Definition eorder.h:15

Definition at line 55 of file rgbw.cpp.

58 {
59 (void)w_color_temperature;
60 *out_r = scale8(r, r_scale);
61 *out_g = scale8(g, g_scale);
62 *out_b = scale8(b, b_scale);
63 *out_w = min3(r, g, b);
64}
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
Definition scale8.h:34
uint8_t min3(uint8_t a, uint8_t b, uint8_t c)
Definition rgbw.cpp:15

References scale8().

Referenced by rgb_2_rgbw().

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