{"id":16521938,"url":"https://github.com/meshula/nanocolor","last_synced_at":"2025-04-07T12:09:56.449Z","repository":{"id":226342779,"uuid":"768430586","full_name":"meshula/Nanocolor","owner":"meshula","description":"Nanocolor, a lightweight color transformation library","archived":false,"fork":false,"pushed_at":"2025-02-06T17:04:47.000Z","size":3290,"stargazers_count":87,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-31T11:03:49.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meshula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-03-07T04:15:58.000Z","updated_at":"2025-03-10T19:58:42.000Z","dependencies_parsed_at":"2024-04-16T04:25:07.255Z","dependency_job_id":"f391b94d-85a1-4f48-b1d2-1ea0cb962ff2","html_url":"https://github.com/meshula/Nanocolor","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"d1282fc26e5e18ed9a67b7a2bf72627dcffcd7d4"},"previous_names":["meshula/nanocolor"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FNanocolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FNanocolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FNanocolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FNanocolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshula","download_url":"https://codeload.github.com/meshula/Nanocolor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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","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":[],"created_at":"2024-10-11T16:58:41.742Z","updated_at":"2025-04-07T12:09:56.420Z","avatar_url":"https://github.com/meshula.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nanocolor\n\n## A very small color transform library\n\n### Pixar Animation Studios\n\n## Introduction\n\nColor management and transformation is a complex domain.\nValues are captured by cameras or generated by renderers,\ntransferred to a storage medium, combined into frame buffers\nto make new images, transformed for display, and projected\nby devices. During each step, the color values may be\ntransformed by photochemical, electro-optical, and digital\nprocesses.\n\nA renderer's input working space to output working space is\nan interesting subset of that domain, and it's the subset\nthat Nanocolor concerns itself with.\n\nOpenEXR goes so far as to restrict itself to linear working\nspaces, and describes them completed by specifying chromaticities\nand an adapted whitepoint in the CIEXYZ 1931 space. Nanocolor\ntakes inspiration from this, and uses the equations in SMPTE\ndocument RP177-1993 (reaffirmed in 2002) ~ SMPTE Recommended\nPractice: Derivation of Basic Television Equations.\n\nInteresting colors do not just come from OpenEXR however, but\nmay originate as properties in a MaterialX shade graph, vertex\nattributes in an OpenUSD file, or PNG or TIFF textures, to\nname a few common sources.\n\nAmongst all these sources, only OpenEXR specifies colors in terms\nof chromaticities and whitepoint. Some sources specify the color\nspace in documentation, whereas others name color spaces in the\ndata itself, or refer to site specific configuration files in\nthe OpenColorIO format, and other alternatives. This lack of\nbroad agreement on such things as what the name of a colorspace\nactually refers to makes accurate and reproducible color\ncalculations between software packages and studios challenging.\n\nMaterialX takes an interesting perspective; it names a bakers'\ndozen of color spaces and defines them as OpenEXR does, and\nalso introduces a notion of being able to remove an input transform\nfrom a color in order to accomodate image formats commonly used\nas texture sources for shader graphs.\n\nNanocolor follows this idea, and also introduces that all the\ncolor spaces must be invertible, in the sense that a value can\nhave its input transform removed to make it a linear color value,\nlinear values may be transformed as desired through matrix\nmultiplication, and an output transform may be re-applied. This\nallows Nanocolor to transform any color space with this invertible\nproperty to any other with the invertible property.\n\n_____\n\n## Definitions\n\nNomenclature shall be as per ISO 22028-1 terminology, and will occasionally spell colour with a u per common usage.\n\n### Colour space\n\nA geometric representation of colors in a metrical space.\n\n### Colorimetric colour space\n\nA colour space having an exact and simple relationship to CIEXY colorimetric values.\n\n### Adopted white\n\nA “spectral radiance distribution” that converts to achromatic colour signals where each component is 1.0\n\n### Additive RGB colour space\n\ncolorimetric colour space with three primary chromaticities, a white point, and a transfer function\n\n### Colour space encoding\n\n“digital encoding of a colour space, including ... digital encoding method, and ... value range”\n\n### Colour image encoding\n\nColour space encoding plus context, including image state, intended viewing environment, and for print, reference medium\n\n_____\n\n## Scope\n\nColour space encoding is in scope.\n\nColour image encoding is out of scope.\n\nCamera vendor specific colour spaces are out of scope.\n\nColour spaces relative to a particular encoded white (cf. LAB, LUV, etc but also IPT and other spaces optimized for gamut mapping) are out of scope.\n\nHybrid Log Gamma encoding is out of scope.\n\n_____\n\n## Nanocolor API\n\nRefer to nanocolor.h\n\n## Building\n\nThere are no build scripts included with Nanocolor. You may build\nit as a library if you wish, or you may include nanocolor.c,\nand optionally nanocolorUtils.c in your project.\n\n## License and Copyright\n\n```c\n//\n// Copyright 2024 Pixar\n//\n// Licensed under the Apache License, Version 2.0 (the \"Apache License\")\n//\n// You may obtain a copy of the Apache License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the Apache License with the above modification is\n// distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the Apache License for the specific\n// language governing permissions and limitations under the Apache License.\n//\n```\n\n## Acknowledgements\n\nThanks to the scientists at Pixar, OpenColorIO, OpenEXR, OpenUSD, and MaterialX\nfor the fruitful advice and feedback that helped guide the creation of Nanocolor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Fnanocolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshula%2Fnanocolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Fnanocolor/lists"}