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

◆ rainbow()

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

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

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

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

+ Here is the call graph for this function: