How to use the colorio.illuminants.d65 function in colorio

To help you get started, we’ve selected a few colorio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / colorio / test / test_conversions.py View on Github external
def test_spectrum_to_xyz():
    colorio.illuminants.spectrum_to_xyz(colorio.illuminants.d65())
    return
github nschloe / colorio / test / test_tools.py View on Github external
def test_visible_gamut(colorspace, cut_000):
    illuminant = colorio.illuminants.d65()
    observer = colorio.observers.cie_1931_2()
    colorspace.save_visible_gamut(observer, illuminant, "visible.vtu", cut_000=cut_000)
github nschloe / colorio / test / test_illuminants.py View on Github external
def test_spectrum_to_xyz100():
    spectrum = colorio.illuminants.d65()
    observer = colorio.observers.cie_1931_2()
    colorio.illuminants.spectrum_to_xyz100(spectrum, observer)
    return
github nschloe / colorio / test / test_illuminants.py View on Github external
def test_show():
    lmbda, data = colorio.illuminants.d65()
    plt.plot(lmbda, data)
    # for T in [1000, 2000, 3000, 4000, 5000, 1000]:
    #     lmbda, data = colorio.illuminants.planckian_radiator(T)
    #     plt.plot(lmbda, data)
    plt.ylim(ymin=0)
    plt.show()
    return
github nschloe / colorio / test / test_illuminants.py View on Github external
        (colorio.illuminants.d65(), 4, [0.03410, 3.2945, 20.2360]),
        # 5.132 is different from the standard; 5.133 is listed there. This is a
        # false rounding.
        (colorio.illuminants.d75(), 3, [0.043, 5.132, 29.808]),
    ],
)
def test_values(illuminant, decimals, values):
    _, data = illuminant
    rdata = numpy.around(data, decimals=decimals)
    assert rdata[0] == values[0]
    assert rdata[1] == values[1]
    assert rdata[2] == values[2]
    return
github nschloe / colorio / colorio / cam02.py View on Github external
    def __init__(self, c, Y_b, L_A, whitepoint=white_point(d65())):
        self.ciecam02 = CIECAM02(c, Y_b, L_A, whitepoint)
        self.K_L = 1.0
        self.c1 = 0.007
        self.c2 = 0.0228
        return