Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Created May 2, 2015 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/d1cd8e27d66661610b29 to your computer and use it in GitHub Desktop.
Save KelSolaar/d1cd8e27d66661610b29 to your computer and use it in GitHub Desktop.
mmColorTarget - Colourspaces
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