summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-05-19 11:11:08 -0500
committerDrashna Jaelre <drashna@live.com>2019-05-19 16:02:17 -0700
commit5b69491bacc6b4520e3875fd3badf04fb20e77a0 (patch)
treeeab68059c92216d036dbda3dba8904170e9f79db
parent05e01eb565c1788187dbb8dac91371ae9f3f2cc8 (diff)
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
-rw-r--r--quantum/color.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/color.c b/quantum/color.c
index 466e6edacb..a309da379a 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;
}