summaryrefslogtreecommitdiffstats
path: root/src/curve.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/curve.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/curve.py b/src/curve.py
index cac2b53..23a77cb 100644
--- a/src/curve.py
+++ b/src/curve.py
@@ -389,11 +389,12 @@ def cie_invert(r = True, g = None, b = None):
'''
if g is None: g = r
if b is None: b = r
- for (curve, setting) in curves(r, g, b):
- if setting:
- for i in range(i_size):
- (x, y, Y) = srgb_to_ciexyy(r_curve[i], g_curve[i], b_curve[i])
- (r_curve[i], g_curve[i], b_curve[i]) = ciexyy_to_srgb(x, y, 1 - Y)
+ for i in range(i_size):
+ (x, y, Y) = srgb_to_ciexyy(r_curve[i], g_curve[i], b_curve[i])
+ (r_, g_, b_) = ciexyy_to_srgb(x, y, 1 - Y)
+ if r: r_curve[i] = r_
+ if g: g_curve[i] = g_
+ if b: b_curve[i] = b_
def sigmoid(r, g, b):