Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import itertools
import numpy as np
import matplotlib.pyplot as plt
import colour
from colour.plotting import *
line = np.linspace(0.0, 1.0, 15, endpoint=True)
rgb = np.array(list(itertools.product(line,line,line)), dtype=np.float)
XYZ = colour.sRGB_to_XYZ(rgb)
xy = colour.XYZ_to_xy(XYZ)
CIE_1931_chromaticity_diagram_plot(bounding_box=(-0.1, 0.9, -0.1, 0.9), standalone=False)
plt.plot(xy[:,0], xy[:,1], 'o', markersize=2, label="sRGB")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.