FastLED 3.10.8
Loading...
Searching...
No Matches

◆ rainbow()

CRGB fl::FlowFieldFloat::rainbow ( float t,
float speed,
float phase )
staticprivate

Definition at line 156 of file flowfield.cpp.hpp.

156 {
157 float hue = fmodPos(t * speed + phase, 1.0f);
158 CHSV hsv((u8)(hue * 255.0f), 255, 255);
159 CRGB rgb;
160 hsv2rgb_rainbow(hsv, rgb);
161 return rgb;
162}
uint8_t hue
Definition advanced.h:94
float speed() const FL_NO_EXCEPT
Definition flowfield.h:258
static float fmodPos(float x, float m) FL_NO_EXCEPT
fl::hsv8 CHSV
Definition chsv.h:11
CRGB hsv2rgb_rainbow(const CHSV &hsv) FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131
fl::CRGB CRGB
Definition video.h:18

References fl::FL_NO_EXCEPT, fmodPos(), hsv2rgb_rainbow(), hue, fl::FlowField::speed(), and fl::t.

+ Here is the call graph for this function: