Created
May 2, 2015 20:37
-
-
Save KelSolaar/d1cd8e27d66661610b29 to your computer and use it in GitHub Desktop.
mmColorTarget - Colourspaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import colour | |
name, data, illuminant = colour.COLOURCHECKERS['ColorChecker 2005'] | |
for i, (name, colourspace) in enumerate( | |
sorted(colour.RGB_COLOURSPACES.items())): | |
if name in ('aces', 'adobe1998', 'prophoto'): | |
continue | |
a = [] | |
for index, _, x, y, Y in data: | |
RGB = colour.XYZ_to_RGB( | |
colour.xyY_to_XYZ(np.array([x, y, Y])), | |
illuminant, | |
colourspace.whitepoint, | |
colourspace.XYZ_to_RGB_matrix, | |
'CAT02') | |
a.append(RGB) | |
a = np.array(a) | |
print(name) | |
print(repr(a)) | |
print('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment