Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hsv2rgb.h - github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d97d1956851b4c27fc8eec8192478f2043b46297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __INC_HSV2RGB_H
#define __INC_HSV2RGB_H

#include "pixeltypes.h"


// hsv2rgb - convert hue, saturation, and value to RGB.
//
//           NOTE: Hue is 0-191 only!
//                 Saturation & value are 0-255 each.
//

#if defined(__AVR__)
#define hsv2rgb hsv2rgb_avr
#else
#define hsv2rgb  hsv2rgb_C
#endif

#define HSV_HUE_MAX 191

void hsv2rgb_C (struct CHSV & hsv, struct CRGB & rgb);
void hsv2rgb_avr(struct CHSV & hsv, struct CRGB & rgb);


// rainbow2rgb - convert a hue, saturation, and value to RGB
//               but use a visually balanced rainbow instead of
//               a mathematically balanced spectrum.
//
//               NOTE: here hue is 0-255, not just 0-191!
//

#define RAINBOW_HUE_MAX 255

void rainbow2rgb( CHSV& hsv, CRGB& rgb);


#endif