diff options
author | kriegsman@gmail.com <kriegsman@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b> | 2013-04-17 07:39:04 +0400 |
---|---|---|
committer | kriegsman@gmail.com <kriegsman@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b> | 2013-04-17 07:39:04 +0400 |
commit | 25a73ad4f39e72dcbc29d435e27c6ac7016f9c7d (patch) | |
tree | 5844a7fbdeb97a184d5f4965ac936d935b6699de /hsv2rgb.h | |
parent | c1a756245f239011ee70c300e229ce4de39d0914 (diff) |
MEK: added rainbow2rgb( hsv, rgb) which gives a rainbow-like color spread vs hsv2rgb which gives a spectrum. Biggest differences are that rainbow2rgb takes hue from 0-255, and hsv2rgb takes hue just from 0-191. Also, rainbow2rgb has actual yellow in it.
Diffstat (limited to 'hsv2rgb.h')
-rw-r--r-- | hsv2rgb.h | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -4,8 +4,11 @@ #include "pixeltypes.h" -void hsv2rgb_C (struct CHSV & hsv, struct CRGB & rgb); -void hsv2rgb_avr(struct CHSV & hsv, struct CRGB & rgb); +// 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 @@ -13,5 +16,18 @@ void hsv2rgb_avr(struct CHSV & hsv, struct CRGB & rgb); #define hsvrgb hsv2rgb_C #endif +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! +// + +void rainbow2rgb( CHSV& hsv, CRGB& rgb); + #endif |