from shared import * import crl, numpy as np, matplotlib.pyplot as plt Ts = np.logspace(np.log10(1000), np.log10(10000)) colors = [] for T in Ts: x, y, _ = crl.xyY(crl.BlackBodySpectrum(T)) colors.append([*crl.sRGB(crl.xyY(x, y, 0.5))]) colors = np.array(colors) plot_setup() plot_colorbar(Ts, colors) plt.xlabel("$T~[\\mathrm{K}]$") plot_export()