summaryrefslogtreecommitdiff
path: root/test_example.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_example.py')
-rw-r--r--test_example.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test_example.py b/test_example.py
index f497bbf..d0be8dd 100644
--- a/test_example.py
+++ b/test_example.py
@@ -1,8 +1,6 @@
import numpy as np
from colour import *
-from colour.plotting import *
-from colour.difference import *
-from matplotlib import pyplot as plt
+from colour.difference import delta_E_CIE1976
from jakob_hanika import jakob_hanika, model_sd
from test_colorchecker import plot_comparison
@@ -20,10 +18,10 @@ cc_ref = np.array([ 18.70184886, -13.19804478, 2.12180137])
if __name__ == "__main__":
XYZ = sRGB_to_XYZ(1.055 * RGB_ref ** (1/2.4) - 0.055, ill_xy)
- target = XYZ_to_Lab(XYZ, ill_xy)
+ Lab = XYZ_to_Lab(XYZ, ill_xy)
- print("Target: X=%g, Y=%g, Z=%g, L=%g, a=%g, b=%g" % (*XYZ, *target))
- ccp, error = jakob_hanika(target, ill_sd, ill_xy)
+ print("Target: X=%g, Y=%g, Z=%g, L=%g, a=%g, b=%g" % (*XYZ, *Lab))
+ ccp, error = jakob_hanika(XYZ, ill_sd, ill_xy)
reference_sd = model_sd(cc_ref)
reference_XYZ = sd_to_XYZ(reference_sd, illuminant=ill_sd)