How to use the colorio.XYY 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_tools.py View on Github external
def test_xy_gamut_mesh():
    points, cells = colorio.xy_gamut_mesh(0.05)

    # import meshio
    # meshio.write_points_cells("test.vtu", points, {"triangle": cells})
    # exit(1)


if __name__ == "__main__":
    # test_luo_rigg()
    # test_xy_gamut_mesh()
    # test_macadam()
    # colorspace_ = colorio.SrgbLinear()
    # colorspace_ = colorio.Hdr()
    # colorspace_ = colorio.XYZ()
    colorspace_ = colorio.XYY()
    # colorspace_ = colorio.IPT()
    # colorspace_ = colorio.JzAzBz()
    # colorspace_ = colorio.CIELUV()
    # colorspace_ = colorio.CIELAB()
    # colorspace_ = colorio.CAM02('UCS', 0.69, 20, 64/numpy.pi/5)
    # colorspace_ = colorio.CAM16UCS(0.69, 20, 64 / numpy.pi / 5)
    # test_hdr_gamut(colorspace_, n=10)
    # test_visible_gamut(colorspace_, cut_000=False)
    # test_srgb_gamut(colorspace_, cut_000=False)
    # test_ebner_fairchild(colorspace_)
    test_hung_berns(colorspace_)
    # test_xiao(colorspace_)
github nschloe / colorio / test / test_tools.py View on Github external
        colorio.XYY(),
        colorio.CAM02("UCS", 0.69, 20, 64 / numpy.pi / 5),
    ],
)
def test_cone_gamut(colorspace, n=10):
    observer = colorio.observers.cie_1931_2()
    colorspace.save_cone_gamut("cone.vtu", observer, max_Y=1)
github nschloe / colorio / test / test_xyy.py View on Github external
def test_conversion(xyz):
    xyy = colorio.XYY()
    out = xyy.to_xyz100(xyy.from_xyz100(xyz))
    assert numpy.all(abs(xyz - out) < 1.0e-14)
    return
github nschloe / colorio / test / test_color_space.py View on Github external
        [colorio.XYY(), 2, 0.4],
        [colorio.CIELAB(), 0, 50],
        [colorio.CAM16UCS(0.69, 20, 4.074), 0, 50],
    ],
)
def test_visible_slice(cs, k0, level):
    cs.show_visible_slice(k0, level)
    # cs.save_visible_slice("visible-slice.png", k0, level)