diff options
Diffstat (limited to 'quantum/color.c')
-rw-r--r-- | quantum/color.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/quantum/color.c b/quantum/color.c index 847129736..1f398e240 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -36,7 +36,11 @@ RGB hsv_to_rgb(HSV hsv) { h = hsv.h; s = hsv.s; +#ifdef USE_CIE1931_CURVE + v = pgm_read_byte(&CIE1931_CURVE[hsv.v]); +#else v = hsv.v; +#endif region = h * 6 / 255; remainder = (h * 2 - region * 85) * 3; @@ -79,11 +83,5 @@ RGB hsv_to_rgb(HSV hsv) { break; } -#ifdef USE_CIE1931_CURVE - rgb.r = pgm_read_byte(&CIE1931_CURVE[rgb.r]); - rgb.g = pgm_read_byte(&CIE1931_CURVE[rgb.g]); - rgb.b = pgm_read_byte(&CIE1931_CURVE[rgb.b]); -#endif - return rgb; } |