|
|
@ -17,6 +17,7 @@ |
|
|
|
#include "color.h" |
|
|
|
#include "color.h" |
|
|
|
#include "led_tables.h" |
|
|
|
#include "led_tables.h" |
|
|
|
#include "progmem.h" |
|
|
|
#include "progmem.h" |
|
|
|
|
|
|
|
#include "util.h" |
|
|
|
|
|
|
|
|
|
|
|
RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) { |
|
|
|
RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) { |
|
|
|
RGB rgb; |
|
|
|
RGB rgb; |
|
|
@ -109,9 +110,6 @@ RGB hsv_to_rgb_nocie(HSV hsv) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef RGBW |
|
|
|
#ifdef RGBW |
|
|
|
# ifndef MIN |
|
|
|
|
|
|
|
# define MIN(a, b) ((a) < (b) ? (a) : (b)) |
|
|
|
|
|
|
|
# endif |
|
|
|
|
|
|
|
void convert_rgb_to_rgbw(LED_TYPE *led) { |
|
|
|
void convert_rgb_to_rgbw(LED_TYPE *led) { |
|
|
|
// Determine lowest value in all three colors, put that into
|
|
|
|
// Determine lowest value in all three colors, put that into
|
|
|
|
// the white channel and then shift all colors by that amount
|
|
|
|
// the white channel and then shift all colors by that amount
|
|
|
|