from shared import * import crl, numpy as np, matplotlib.pyplot as plt wvls = np.linspace(380, 780, 200) colors = [] for wvl in wvls: x, y, Y = crl.xyY(crl.PointSpectrum(wvl)) colors.append([*crl.sRGB(crl.xyY(x, y, Y / 2))]) colors = np.array(colors) plot_setup() plot_colorbar(wvls, colors) plt.xlabel("$\\lambda~[\\mathrm{nm}]$") plot_export()