{"id":13928661,"url":"https://github.com/coloria-dev/coloria","last_synced_at":"2025-12-11T22:44:32.333Z","repository":{"id":41203214,"uuid":"117857384","full_name":"coloria-dev/coloria","owner":"coloria-dev","description":":rainbow: Tools for color research","archived":false,"fork":false,"pushed_at":"2025-07-19T08:42:14.000Z","size":30873,"stargazers_count":416,"open_issues_count":2,"forks_count":34,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-11-29T06:34:08.172Z","etag":null,"topics":["color","color-science","colour","colour-science","gamut","python"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coloria-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-17T15:48:08.000Z","updated_at":"2025-11-23T22:55:54.000Z","dependencies_parsed_at":"2025-07-19T10:14:39.431Z","dependency_job_id":"7ecd256b-ac99-4d3e-b5ab-3330bea3d4e7","html_url":"https://github.com/coloria-dev/coloria","commit_stats":null,"previous_names":["colorio-dev/colorio","nschloe/colorio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coloria-dev/coloria","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coloria-dev%2Fcoloria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coloria-dev%2Fcoloria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coloria-dev%2Fcoloria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coloria-dev%2Fcoloria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coloria-dev","download_url":"https://codeload.github.com/coloria-dev/coloria/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coloria-dev%2Fcoloria/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27671940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","color-science","colour","colour-science","gamut","python"],"created_at":"2024-08-07T18:01:13.930Z","updated_at":"2025-12-11T22:44:32.266Z","avatar_url":"https://github.com/coloria-dev.png","language":"TeX","funding_links":[],"categories":["TeX"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/coloria-dev/coloria\"\u003e\u003cimg alt=\"coloria\" src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/logo/coloria-logo.png\" width=\"60%\"\u003e\u003c/a\u003e\n  \u003cp align=\"center\"\u003eTools for color research.\u003c/p\u003e\n\u003c/p\u003e\n\n[![PyPi Version](https://img.shields.io/pypi/v/coloria.svg?style=flat-square)](https://pypi.org/project/coloria/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/coloria.svg?style=flat-square)](https://pypi.org/project/coloria/)\n[![GitHub stars](https://img.shields.io/github/stars/coloria-dev/coloria.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/coloria-dev/coloria)\n[![Downloads](https://pepy.tech/badge/coloria/month?style=flat-square)](https://pepy.tech/project/coloria)\n\n\u003c!--[![PyPi downloads](https://img.shields.io/pypi/dm/coloria.svg?style=flat-square)](https://pypistats.org/packages/coloria)--\u003e\n\n[![Discord](https://img.shields.io/static/v1?logo=discord\u0026logoColor=white\u0026label=chat\u0026message=on%20discord\u0026color=7289da\u0026style=flat-square)](https://discord.gg/hnTJ5MRX2Y)\n\n### Installation\n\nInstall Coloria [from PyPI](https://pypi.org/project/coloria/) with\n\n```\npip install coloria\n```\n\nTo run Coloria, you need a license. See [here](https://github.com/coloria-dev)\nfor more info.\n\n### Illuminants, observers, white points\n\n|                                                Illuminants                                                |                                                   CIE 1931 Observer                                                   |\n| :-------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: |\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/illuminants.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/cie-standard-observer-2.svg\" width=\"100%\"\u003e |\n\n```python\nimport coloria\nimport matplotlib.pyplot as plt\n\nillu = coloria.illuminants.d65()\nplt.plot(illu.lmbda_nm, illu.data)\nplt.xlabel(\"wavelength [nm]\")\nplt.show()\n```\n\nThe following illuminants are provided:\n\n- Illuminant A (\"indoor light\", `coloria.illuminants.a(resolution_in_nm)`)\n- Illuminant C (obsolete, \"North sky daylight\", `coloria.illuminants.c()`)\n- Illuminants D (\"natural daylight\", `coloria.illuminants.d(nominal_temp)` or\n  `coloria.illuminants.d65()`\n  etc.)\n- Illuminant E (equal energy, `coloria.illuminants.e()`)\n- Illuminant series F (\"fluorescent lighting\", `coloria.illuminants.f2()` etc.)\n\nObservers:\n\n- CIE 1931 Standard 2-degree observer (`coloria.observers.coloria.observers.cie_1931_2()`)\n- CIE 1964 Standard 10-degree observer (`coloria.observers.coloria.observers.cie_1964_10()`)\n\n### Color appearance models\n\nColor appearance models (CAMs) predicts all kinds of parameters in color perception,\ne.g., lightness, brightness, chroma, colorfulness, saturation etc. Since these\nvalues depend on various factors, such as the surrouning, the models are initialized\nwith various different parameters.\n\nCAMs can be used to construct color _spaces_ (see below).\n\nThe color appearance models available in coloria are\n\n- CIECAM02 / CAM02-UCS\n\n  ```python\n  import coloria\n\n  ciecam02 = coloria.cam.CIECAM02(\n      surround_type=\"average\",  # or dim, dark\n      background_luminance_percent=20,\n      adapting_luminance_cd_m2=100,\n  )\n\n  xyz = [19.31, 23.93, 10.14]\n  corr = ciecam02.from_xyz100(xyz)\n  # then work with those values:\n  corr.lightness\n  corr.brightness\n  corr.chroma\n  corr.hue_composition\n  corr.hue_angle_degrees\n  corr.colorfulness\n  corr.saturation\n  ```\n\n- CAM16 / CAM16-UCS\n\n  ```python\n  import coloria\n\n  cam16 = coloria.cam.CAM16(\"average\", 20, 100)\n  ```\n\n- ZCAM\n\n  ```python\n  import coloria\n\n  cam16 = coloria.cam.ZCAM(\"average\", 20, 100, 20)\n  ```\n\n### Color coordinates and spaces\n\nColor coordinates are handled as NumPy arrays or as `ColorCoordinates`, a thin\nwrapper around the data that retains the color space information and has some\nhandy helper methods. Color spaces can be instantiated from the classes in\n`coloria.cs`, e.g.,\n\n```python\nimport coloria\n\ncoloria.cs.CIELAB()\n```\n\nMost methods that accept such a colorspace also accept a string, e.g.,\n`cielab`.\n\nAs an example, to interpolate two sRGB colors in OKLAB, and return the sRGB:\n\n```python\nfrom coloria.cs import ColorCoordinates\n\n# you can also plug in large numpy arrays instead of two lists here\nc0 = ColorCoordinates([1.0, 1.0, 0.0], \"srgb1\")  # yellow\nc1 = ColorCoordinates([0.0, 0.0, 1.0], \"srgb1\")  # blue\n\n# naive interpolation gives [0.5, 0.5, 0.5], a mid gray\n\n# convert to OKLAB\nc0.convert(\"oklab\")\nc1.convert(\"oklab\")\n\n# interpolate\nc2 = (c0 + c1) * 0.5\n\nc2.convert(\"srgbhex\", mode=\"clip\")\n\nprint(c2.color_space)\nprint(c2.data)\n```\n\n\u003c!--pytest-codeblocks:expected-output--\u003e\n\n```\n\u003ccoloria color space sRGB-hex\u003e\n#6cabc7\n```\n\nAll color spaces implement the two methods\n\n\u003c!--pytest.mark.skip--\u003e\n\n```python\nvals = colorspace.from_xyz100(xyz)\nxyz = colorspace.to_xyz100(vals)\n```\n\nfor conversion from and to XYZ100. Adding new color spaces is as easy as writing a class\nthat provides those two methods. The following color spaces are already implemented:\n\n- XYZ (`coloria.cs.XYZ(100)`, the\n  parameter determining the scaling)\n- xyY\n  (`coloria.cs.XYY(100)`, the parameter determining the scaling of `Y`)\n- sRGB (`coloria.cs.SRGBlinear()`,\n  `coloria.cs.SRGB1()`, `coloria.cs.SRGB255()`, `coloria.cs.SRGBhex()`)\n- HSL and HSV (`coloria.cs.HSL()`,\n  `coloria.cs.HSV()`)\n  These classes also have the two methods\n  ```\n  from_srgb1()\n  to_srgb1()\n  ```\n  for direct conversion from and to standard RGB.\n- [OSA-UCS (`coloria.cs.OsaUcs()`)](https://en.wikipedia.org/wiki/OSA-UCS), 1947\n- CIE 1960 UCS (`coloria.cs.CIE1960UCS()`), 1960\n- CIEUVW (`coloria.cs.CIEUVW()`), 1964\n- CIELAB (`coloria.cs.CIELAB()`), 1976\n- CIELUV (`coloria.cs.CIELUV()`), 1976\n- [RLAB (`coloria.cs.RLAB()`)](https://doi.org/10.1117/12.149061), 1993\n- [IPT\n  (`coloria.cs.IPT()`)](https://www.ingentaconnect.com/content/ist/cic/1998/00001998/00000001/art00003),\n  1998\n- DIN99 and its variants DIN99{b,c,d} (`coloria.cs.DIN99()`), 1999\n- CAM02-UCS, 2002\n\n  ```python\n  import coloria\n\n  cam02 = coloria.cs.CAM02(\"UCS\", \"average\", 20, 100)\n  ```\n\n  The implementation contains a few improvements over the CIECAM02\n  specification (see [here](https://arxiv.org/abs/1802.06067)).\n\n- CAM16-UCS, 2016\n\n  ```python\n  import coloria\n\n  cam16ucs = coloria.cs.CAM16UCS(\"average\", 20, 100)\n  ```\n\n  The implementation contains a few improvements over the CAM16\n  specification (see [here](https://arxiv.org/abs/1802.06067)).\n\n- SRLAB2 (`coloria.cs.SRLAB2()`)\n- [J\u003csub\u003ez\u003c/sub\u003ea\u003csub\u003ez\u003c/sub\u003eb\u003csub\u003ez\u003c/sub\u003e](https://doi.org/10.1364/OE.25.015131)\n  (`coloria.cs.JzAzBz()`), 2017\n- [ICtCp (`coloria.cs.ICtCp()`)](https://en.wikipedia.org/wiki/ICtCp), 2018\n- [I\u003csub\u003eG\u003c/sub\u003eP\u003csub\u003eG\u003c/sub\u003eT\u003csub\u003eG\u003c/sub\u003e\n  (`coloria.cs.IGPGTG()`)](https://doi.org/10.2352/J.Percept.Imaging.2020.3.2.020401),\n  2020\n- [proLab (`coloria.cs.PROLAB()`)](https://arxiv.org/abs/2012.07653), 2020\n- [Oklab (`coloria.cs.OKLAB()`)](https://bottosson.github.io/posts/oklab/), 2020\n- OkLCh (`coloria.cs.OKLCH()`), 2020\n- [HCT (`coloria.cs.HCT()`/ HCTLAB\n  (`coloria.cs.HCTLAB()`)](https://material.io/blog/science-of-color-design),\n  2022\n\nAll methods in coloria are fully vectorized, i.e., computation is _really_\nfast.\n\n### Color difference formulas\n\ncoloria implements the following color difference formulas:\n\n- CIE76\n  \u003c!--pytest.mark.skip--\u003e\n  ```python\n  coloria.diff.cie76(lab1, lab2)\n  ```\n- CIE94\n  \u003c!--pytest.mark.skip--\u003e\n  ```python\n  coloria.diff.cie94(lab1, lab2)\n  ```\n- CIEDE2000\n  \u003c!--pytest.mark.skip--\u003e\n  ```python\n  coloria.diff.ciede2000(lab1, lab2)\n  ```\n- CMC l:c\n  \u003c!--pytest.mark.skip--\u003e\n  ```python\n  coloria.diff.cmc(lab1, lab2)\n  ```\n\n### Chromatic adaptation transforms\n\ncoloria implements the following CATs:\n\n- von Kries\n  \u003c!--pytest.mark.skip--\u003e\n  ```python\n  cat, cat_inv = coloria.cat.von_kries(whitepoint_source, whitepoint_destination)\n  xyz1 = cat @ xyz0\n  ```\n- Bradford (`coloria.cat.bradford`)\n- sharp (`coloria.cat.sharp`)\n- CMCCAT2000 (`coloria.cat.cmccat2000`)\n- CAT02 (`coloria.cat.cat02`)\n- CAT16 (`coloria.cat.cat16`)\n- Bianco-Schettini (`coloria.cat.bianco_schettini`)\n\n### Gamut visualization\n\ncoloria provides a number of useful tools for analyzing and visualizing color spaces.\n\n#### sRGB gamut\n\n|                                                        CIELAB                                                         |                                                        CAM16-UCS                                                        |                                                        Oklab                                                         |\n| :-------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: |\n|    \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-cielab.png\" width=\"100%\"\u003e    |     \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-cam16.png\" width=\"100%\"\u003e      |    \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-oklab.png\" width=\"100%\"\u003e    |\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-slice-cielab.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-slice-cam16ucs.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/srgb-gamut-slice-oklab.png\" width=\"100%\"\u003e |\n\nThe sRGB gamut is a perfect cube in sRGB space, and takes curious shapes when translated\ninto other color spaces. The above images show the sRGB gamut in different color spaces.\n\n\u003c!--pytest.mark.skip--\u003e\n\n```python\nimport coloria\n\np = coloria.plot_rgb_gamut(\n    \"cielab\",  # or coloria.cs.CIELAB()\n    n=51,\n    show_grid=True,\n)\np.show()\n```\n\nFor more visualization options, you can store the sRGB data in a file\n\n```python\nimport coloria\n\ncoloria.save_rgb_gamut(\"srgb.vtk\", \"cielab\", n=51)\n# all formats supported by https://github.com/coloria-dev/meshio\n```\n\nand open it with a tool of your choice. See\n[here](https://github.com/coloria-dev/coloria/wiki/Visualizing-VTK-files) for how to open\nthe file in [ParaView](https://www.paraview.org/).\n\nFor lightness slices of the sRGB gamut, use\n\n\u003c!--pytest.mark.skip--\u003e\n\n```python\nimport coloria\n\np = coloria.plot_rgb_slice(\"cielab\", lightness=50.0, n=51)\np.show()\n# or\n# p.screenshot(\"screenshot.png\")\n```\n\n#### Surface color gamut\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/surface-gamut-xyz.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/surface-gamut-cielab.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/surface-gamut-cam16.png\" width=\"100%\"\u003e |\n| :-------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------: |\n|                                                       XYZ                                                       |                                                       CIELAB                                                       |                                                     CAM16-UCS                                                     |\n\nSame as above, but with the surface color gamut visible under a given illuminant.\n\n\u003c!--pytest.mark.skip--\u003e\n\n```python\nimport coloria\n\nilluminant = coloria.illuminants.d65()\nobserver = coloria.observers.cie_1931_2()\n\np = coloria.plot_surface_gamut(\n    \"xyz100\",  # or coloria.cs.XYZ(100)\n    observer,\n    illuminant,\n)\np.show()\n```\n\nThe gamut is shown in grey since sRGB screens are not able to display the colors anyway.\n\n#### The visible gamut\n\n|                                                          xyY                                                          |                                                          JzAzBz                                                          |                                                          Oklab                                                          |\n| :-------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------: |\n|    \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-xyy.png\" width=\"100%\"\u003e    |    \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-jzazbz.png\" width=\"100%\"\u003e    |    \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-oklab.png\" width=\"100%\"\u003e    |\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-slice-xyy.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-slice-jzazbz.png\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/visible-gamut-slice-oklab.png\" width=\"100%\"\u003e |\n\nSame as above, but with the gamut of visible colors up to a given lightness `Y`.\n\n\u003c!--pytest.mark.skip--\u003e\n\n```python\nimport coloria\n\nobserver = coloria.observers.cie_1931_2()\n\ncolorspace = coloria.cs.XYZ(100)\n\np = coloria.plot_visible_gamut(colorspace, observer, max_Y1=1)\np.show()\n```\n\nThe gamut is shown in grey since sRGB screens are not able to display the colors anyway.\n\nFor slices, use\n\n```python\nimport coloria\n\nplt = coloria.plot_visible_slice(\"cielab\", lightness=0.5)\nplt.show()\n```\n\n### Color gradients\n\nWith coloria, you can easily visualize the basic color gradients of any color space.\nThis may make defects in color spaces obvious, e.g., the well-known blue-distortion of\nCIELAB and related spaces. (Compare with [the hue linearity data\nbelow](#hue-linearity).)\n\n```python\nimport coloria\n\nplt = coloria.plot_primary_srgb_gradients(\"cielab\")\nplt.show()\n```\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/gradients-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/gradients-din99.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/gradients-oklab.svg\" width=\"100%\"\u003e |\n| :------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: |\n|                                                     CIELAB                                                     |                                                     DIN99                                                     |                                                     OKLAB                                                     |\n\n### Experimental data\n\ncoloria contains lots of experimental data sets some of which can be used to assess\ncertain properties of color spaces. Most data sets can also be visualized.\n\n#### Color differences\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1974-xyy1.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1974-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1974-cam16ucs.svg\" width=\"100%\"\u003e |\n| :------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------: |\n|                                                      xyY                                                       |                                                      CIELAB                                                      |                                                       CAM16                                                        |\n\nColor difference data from [MacAdam (1974)](https://doi.org/10.1364/JOSA.64.0\"average\"1). The\nabove plots show the 43 color pairs that are of comparable lightness. The data is\nmatched perfectly if the facing line stubs meet in one point.\n\n```python\nimport coloria\n\ndata = coloria.data.MacAdam1974()\n\ncs = coloria.cs.CIELAB\n\nplt = data.plot(cs)\nplt.show()\nprint(coloria.data.MacAdam1974().stress(cs))\n```\n\n```\n24.54774029343344\n```\n\nThe same is available for\n\n```\ncoloria.data.BfdP()\ncoloria.data.Leeds()\ncoloria.data.RitDupont()\ncoloria.data.Witt()\n\ncoloria.data.COMBVD()  # a weighted combination of the above\n```\n\n#### Munsell\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/munsell-xyy1.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/munsell-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/munsell-cam16ucs.svg\" width=\"100%\"\u003e |\n| :--------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: |\n|                                                    xyY                                                     |                                                    CIELAB                                                    |                                                     CAM16                                                      |\n\n[Munsell color data](https://www.rit.edu/cos/colorscience/rc_munsell_renotation.php) is\nvisualized with\n\n```python\nimport coloria\n\ncs = coloria.cs.CIELUV\nplt = coloria.data.Munsell().plot(cs, V=5)\nplt.show()\n```\n\nTo retrieve the Munsell data in xyY format, use\n\n```python\nimport coloria\n\nmunsell = coloria.data.Munsell()\n\n# munsell.h\n# munsell.V\n# munsell.C\n# munsell.xyy\n```\n\n#### Ellipses\n\n##### MacAdam ellipses (1942)\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1942-xyy.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1942-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/macadam1942-cam16.svg\" width=\"100%\"\u003e |\n| :-----------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: |\n|                                                xyY (at Y=0.4)                                                 |                                                 CIELAB (at L=50)                                                 |                                                 CAM16 (at L=50)                                                 |\n\nThe famous MacAdam ellipses (from [this\narticle](https://doi.org/10.1364%2FJOSA.32.000247)) can be plotted with\n\n```python\nimport coloria\n\ncs = coloria.cs.CIELUV\nplt = coloria.data.MacAdam1942(50.0).plot(cs)\nplt.show()\n```\n\nThe better the colorspace matches the data, the closer the ellipses are to circles of\nthe same size.\n\n##### Luo-Rigg ellipses\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/luo-rigg-xyy.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/luo-rigg-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/luo-rigg-cam16ucs.svg\" width=\"100%\"\u003e |\n| :--------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: |\n|                                                    xyY                                                     |                                                    CIELAB                                                     |                                                      CAM16                                                      |\n\nLikewise for [Luo-Rigg](https://doi.org/10.1002/col.5080110107).\n\n```python\nimport coloria\n\n# xyy = coloria.cs.XYY(100)\n# coloria.data.LuoRigg(8).show(xyy, 0.4)\n# coloria.data.LuoRigg(8).savefig(\"luo-rigg-xyy.png\", xyy, 0.4)\n\ncieluv = coloria.cs.CIELUV()\nplt = coloria.data.LuoRigg(8).plot(cieluv, 50)\nplt.show()\n```\n\n#### Hue linearity\n\n##### Ebner-Fairchild\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/ebner-fairchild-xyy1.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/ebner-fairchild-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/ebner-fairchild-cam16ucs.svg\" width=\"100%\"\u003e |\n| :----------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: |\n|                                                        xyY                                                         |                                                        CIELAB                                                        |                                                         CAM16                                                          |\n\nFor example\n\n```python\nimport coloria\n\ncolorspace = coloria.cs.JzAzBz\nplt = coloria.data.EbnerFairchild().plot(colorspace)\nplt.show()\n```\n\nshows constant-hue data from [the Ebner-Fairchild\nexperiments](https://doi.org/10.1117/12.298269) in the hue-plane of some color spaces.\n(Ideally, all colors in one set sit on a line.)\n\n###### Hung-Berns\n\nLikewise for [Hung-Berns](https://doi.org/10.1002/col.5080200506):\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/hung-berns-xyy.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/hung-berns-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/hung-berns-cam16.svg\" width=\"100%\"\u003e |\n| :----------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: |\n|                                                     xyY                                                      |                                                     CIELAB                                                      |                                                     CAM16                                                      |\n\nNote the dark blue distortion in CIELAB and CAM16.\n\n```python\nimport coloria\n\ncolorspace = coloria.cs.JzAzBz\nplt = coloria.data.HungBerns().plot(colorspace)\nplt.show()\n```\n\n###### Xiao et al.\n\nLikewise for [Xiao et al.](https://doi.org/10.1002/col.20637):\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/xiao-xyy.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/xiao-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/xiao-cam16.svg\" width=\"100%\"\u003e |\n| :----------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------: |\n|                                                  xyY                                                   |                                                  CIELAB                                                   |                                                  CAM16                                                   |\n\n```python\nimport coloria\n\ncolorspace = coloria.cs.CIELAB\nplt = coloria.data.Xiao().plot(colorspace)\nplt.show()\n```\n\n#### Lightness\n\n###### Fairchild-Chen\n\n| \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/fairchild-chen-xyy.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/fairchild-chen-cielab.svg\" width=\"100%\"\u003e | \u003cimg src=\"https://raw.githubusercontent.com/coloria-dev/coloria/main/plots/fairchild-chen-cam16.svg\" width=\"100%\"\u003e |\n| :--------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------: |\n|                                                       xyY                                                        |                                                       CIELAB                                                        |                                                       CAM16                                                        |\n\nLightness experiment by [Fairchild-Chen](https://doi.org/10.1117/12.872075).\n\n```python\nimport coloria\n\ncs = coloria.cs.CIELAB\nplt = coloria.data.FairchildChen(\"SL2\").plot(cs)\nplt.show()\n```\n\n### Articles\n\n- [Algorithmic improvements for the CIECAM02 and CAM16 color appearance models,\n  Nico Schlömer, 2018](https://arxiv.org/abs/1802.06067)\n- [On the conversion from OSA-UCS to CIEXYZ, Nico Schlömer,\n  2019](https://arxiv.org/abs/1911.08323)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoloria-dev%2Fcoloria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoloria-dev%2Fcoloria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoloria-dev%2Fcoloria/lists"}