How to use the colorio.CIELCH 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_cielch.py View on Github external
def test_reference_xyz_d50(vals, ref):
    cs = colorio.CIELCH(whitepoint=numpy.array([96.422, 100, 82.521]) / 100)
    xyz = numpy.array(vals) / 100
    assert numpy.all(abs(cs.from_xyz100(xyz) - ref) < 1.0e-6 * abs(numpy.array(ref)))
    return
github nschloe / colorio / test / test_cielch.py View on Github external
def test_reference_xyz(xyz, ref):
    cs = colorio.CIELCH()
    xyz = numpy.array(xyz)
    ref = numpy.array(ref)
    assert numpy.all(abs(cs.from_xyz100(xyz) - ref) < 1.0e-4 * ref)
    return
github nschloe / colorio / test / test_cielch.py View on Github external
def test_conversion(xyz):
    cielch = colorio.CIELCH()
    out = cielch.to_xyz100(cielch.from_xyz100(xyz))
    assert numpy.all(abs(xyz - out) < 1.0e-14)
    return