]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Fixing hsv_to_rgb where s = 0 and v < 255 (#5915)
authorXScorpion2 <rcalt2vt@gmail.com>
Sun, 19 May 2019 16:11:08 +0000 (11:11 -0500)
committerDrashna Jaelre <drashna@live.com>
Sun, 19 May 2019 16:11:08 +0000 (09:11 -0700)
* Fixing hsv to rgb where s is 0 and v is < 255

* Update color.c

quantum/color.c

index 466e6edacb085424bfdaf23ab7cb05615d6c9ed2..a309da379a41cbefbb1e077a71fa8b1347e69bbd 100644 (file)
@@ -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;
        }