diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2019-05-19 11:11:08 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-05-19 09:11:08 -0700 |
commit | f11fde9bf5898a09201042d612caaff8d4692bb9 (patch) | |
tree | adf5fd5ec0fb3fd9f492068ae13c2daa744c87b7 /quantum/color.c | |
parent | 0099bbf9a64a0b4df1093f528481bff39af2c80d (diff) | |
download | qmk_firmware-f11fde9bf5898a09201042d612caaff8d4692bb9.tar.gz |
Fixing hsv_to_rgb where s = 0 and v < 255 (#5915)
* Fixing hsv to rgb where s is 0 and v is < 255
* Update color.c
Diffstat (limited to 'quantum/color.c')
-rw-r--r-- | quantum/color.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/color.c b/quantum/color.c index 466e6edac..a309da379 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -27,9 +27,13 @@ RGB hsv_to_rgb( HSV hsv ) if ( hsv.s == 0 ) { +#ifdef USE_CIE1931_CURVE + rgb.r = rgb.g = rgb.b = pgm_read_byte( &CIE1931_CURVE[hsv.v] ); +#else rgb.r = hsv.v; rgb.g = hsv.v; rgb.b = hsv.v; +#endif return rgb; } |