summaryrefslogtreecommitdiff
path: root/test_integration.py
blob: 35c19ed60ebbdedac25f856149e1751c6923e085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import numpy as np
from colour import *
from colour.recovery import Jakob2019Interpolator
from colour.plotting import plot_multi_sds



illuminant = "D65"
ill_xy = ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][illuminant]
ill_sd = SpectralDistribution(ILLUMINANT_SDS[illuminant])



if __name__ == "__main__":
	RGB = np.array([0.79264853,  0.4, 0.63703843])
	XYZ = sRGB_to_XYZ(1.055 * RGB ** (1/2.4) - 0.055, ill_xy)
	sd = XYZ_to_sd(XYZ, method="Jakob 2019", verbose=True)

	interp = Jakob2019Interpolator()
	interp.read_file("data/srgb.coeff")
	sdi = interp(RGB)

	plot_multi_sds([sd, sdi])