浏览代码

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
XScorpion2 6 年之前
父节点
当前提交
f11fde9bf5
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      quantum/color.c

+ 4 - 0
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;
 	}