FastLED 3.6.0
Loading...
Searching...
No Matches
hsv2rgb.h File Reference

Detailed Description

Functions to convert from the HSV colorspace to the RGB colorspace.

Definition in file hsv2rgb.h.

#include "FastLED.h"
#include "pixeltypes.h"

Go to the source code of this file.

Macros

#define HUE_MAX_RAINBOW   255
 Max hue accepted for the hsv2rgb_rainbow() function.
 
#define HUE_MAX_SPECTRUM   255
 Max hue accepted for the hsv2rgb_spectrum() function.
 
#define HUE_MAX   191
 Max hue accepted for the hsv2rgb_raw() function.
 

Functions

void hsv2rgb_rainbow (const struct CHSV &hsv, struct CRGB &rgb)
 Convert an HSV value to RGB using a visually balanced rainbow.
 
void hsv2rgb_rainbow (const struct CHSV *phsv, struct CRGB *prgb, int numLeds)
 Convert an HSV value to RGB using a visually balanced rainbow.
 
void hsv2rgb_spectrum (const struct CHSV &hsv, struct CRGB &rgb)
 Convert an HSV value to RGB using a mathematically straight spectrum.
 
void hsv2rgb_spectrum (const struct CHSV *phsv, struct CRGB *prgb, int numLeds)
 Convert an HSV value to RGB using a mathematically straight spectrum.
 
void hsv2rgb_raw (const struct CHSV &hsv, struct CRGB &rgb)
 Convert an HSV value to RGB using a mathematically straight spectrum.
 
void hsv2rgb_raw (const struct CHSV *phsv, struct CRGB *prgb, int numLeds)
 Convert an HSV value to RGB using a mathematically straight spectrum.
 
CHSV rgb2hsv_approximate (const CRGB &rgb)
 Recover approximate HSV values from RGB.