Calculates the combined color adjustment to the LEDs at a given scale, color correction, and color temperature.
- Parameters
-
| scale | the scale value for the RGB data (i.e. brightness) |
| colorCorrection | color correction to apply |
| colorTemperature | color temperature to apply |
- Returns
- a CRGB object representing the adjustment, including color correction and color temperature
Definition at line 29 of file crgb.cpp.hpp.
30 {
31#if defined(NO_CORRECTION) && (NO_CORRECTION == 1)
33#else
36 for (
fl::u8 i = 0; i < 3; ++i) {
37 fl::u8 cc = colorCorrection.raw[i];
38 fl::u8 ct = colorTemperature.raw[i];
39 if (cc > 0 && ct > 0) {
40
41
42 fl::u32 work = (((fl::u16)cc) + 1);
43 work *= (((fl::u16)ct) + 1);
45 work /= 0x10000L;
46 adj.raw[i] = work & 0xFF;
47 }
48 }
49 }
50 return adj;
51#endif
52}
fl::UISlider scale("Scale", 4,.1, 4,.1)
FASTLED_FORCE_INLINE CRGB() FL_NO_EXCEPT
Default constructor.
References CRGB(), and scale.
Referenced by fl::CLEDController::getAdjustment().