FastLED 3.9.3
Loading...
Searching...
No Matches
hsv2rgb.h
Go to the documentation of this file.
1#ifndef __INC_HSV2RGB_H
2#define __INC_HSV2RGB_H
3
4#include "FastLED.h"
5
6#include "pixeltypes.h"
7
10
57
59
60FASTLED_NAMESPACE_BEGIN
61
62
71void hsv2rgb_rainbow( const struct CHSV& hsv, struct CRGB& rgb);
72
78void hsv2rgb_rainbow( const struct CHSV* phsv, struct CRGB * prgb, int numLeds);
79
81#define HUE_MAX_RAINBOW 255
82
83
95void hsv2rgb_spectrum( const struct CHSV& hsv, struct CRGB& rgb);
96
98inline CRGB hsv2rgb_spectrum( const struct CHSV& hsv) {
99 CRGB rgb;
100 hsv2rgb_spectrum(hsv, rgb);
101 return rgb;
102}
103
109void hsv2rgb_spectrum( const struct CHSV* phsv, struct CRGB * prgb, int numLeds);
110
112#define HUE_MAX_SPECTRUM 255
113
114
115
123void hsv2rgb_raw(const struct CHSV& hsv, struct CRGB & rgb);
124
130void hsv2rgb_raw(const struct CHSV* phsv, struct CRGB * prgb, int numLeds);
131
133#define HUE_MAX 191
134
135
171CHSV rgb2hsv_approximate( const CRGB& rgb);
172
173
174FASTLED_NAMESPACE_END
175
177
178#endif
central include file for FastLED, defines the CFastLED class/object
void hsv2rgb_raw(const struct CHSV &hsv, struct CRGB &rgb)
Convert an HSV value to RGB using a mathematically straight spectrum.
Definition hsv2rgb.cpp:23
void hsv2rgb_spectrum(const struct CHSV &hsv, struct CRGB &rgb)
Convert an HSV value to RGB using a mathematically straight spectrum.
Definition hsv2rgb.cpp:226
void hsv2rgb_rainbow(const struct CHSV &hsv, struct CRGB &rgb)
Convert an HSV value to RGB using a visually balanced rainbow.
CHSV rgb2hsv_approximate(const CRGB &rgb)
Recover approximate HSV values from RGB.
Definition hsv2rgb.cpp:498
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition chsv.h:11
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:39