summaryrefslogtreecommitdiff
path: root/quantum/color.c
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-09-18 20:32:38 -0500
committerDrashna Jaelre <drashna@live.com>2019-09-18 18:32:38 -0700
commit095b88bca528a827029c92b2e4053061223f4f9d (patch)
tree45cb28d12f52a5b80a3072ee9ae41101932fc21e /quantum/color.c
parent46c49ae4e639509ceb6e81c460855d2eb89086b8 (diff)
Smoother Linear Light Table (#6764)
Diffstat (limited to 'quantum/color.c')
-rw-r--r--quantum/color.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/quantum/color.c b/quantum/color.c
index 847129736d..1f398e2403 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;
}