HCL color space
{{Short description|Color space model}}
{{Multiple issues|{{more citations needed|date=October 2015}}{{unfocused|date = December 2020}}}}
HCL (Hue-Chroma-Luminance) or LCh refers to any of the many cylindrical color space models that are designed to accord with human perception of color with the three parameters. Lch has been adopted by information visualization practitioners to present data without the bias implicit in using varying saturation.{{cite conference | last1 = Ihaka | first1 = Ross | author1-link = Ross Ihaka | title = Colour for Presentation Graphics | book-title = Proceedings of the 3rd International Workshop on Distributed Statistical Computing, Vienna, Austria | editor1-last = Hornik | editor1-first = Kurt | editor2-last = Leisch | editor2-first = Friedrich | editor3-last = Zeileis | editor3-first = Achim | issn = 1609-395X | year = 2003 | url = http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/ }}{{cite journal | last1 = Zeileis | first1 = Achim | last2 = Hornik | first2 = Kurt | last3 = Murrell | first3 = Paul | title = Escaping RGBland: Selecting Colors for Statistical Graphics | journal = Computational Statistics & Data Analysis | volume = 53 | issue = 9 | pages = 3259–3270 | year = 2009 | doi = 10.1016/j.csda.2008.11.033 | url = https://epub.wu.ac.at/1692/1/document.pdf }}{{cite journal | last1 = Stauffer | first1 = Reto | last2 = Mayr | first2 = Georg J. | last3 = Dabernig | first3 = Markus | last4 = Zeileis | first4 = Achim | title = Somewhere over the Rainbow: How to Make Effective Use of Colors in Meteorological Visualizations | journal = Bulletin of the American Meteorological Society | volume = 96 | issue = 2 | pages = 203–216 | year = 2015 | doi = 10.1175/BAMS-D-13-00155.1 | bibcode = 2015BAMS...96..203S | hdl = 10419/101098 | hdl-access = free }} They are, in general, designed to have characteristics of both cylindrical translations of the RGB color space, such as HSL and HSV, and the L*a*b* color space. Some conflicting definitions of the terms are:
- A name for a cylindrical transformation of CIELuv (CIELChuv) employed by Ihaka (2003) and adopted by Zeileis et al. (2009, 2020). This name appears to be the one most commonly used in information visualization. Ihaka, Zeileis, and co-authors also provide software implementations and web pages to promote its use.{{Cite journal | last1 = Zeileis|first1 = Achim|title = colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes|last2 = Fisher|first2 = Jason C.|last3 = Hornik|first3 = Kurt|last4 = Ihaka|first4 = Ross|last5 = McWhite|first5 = Claire D.|last6 = Murrell|first6 = Paul|last7 = Stauffer|first7 = Reto|last8 = Wilke|first8 = Claus O.| journal = Journal of Statistical Software | year = 2020 | volume = 96 | issue = 1 | pages = 1–49 | doi = 10.18637/jss.v096.i01 | doi-access = free|arxiv = 1903.06490| s2cid=80628405 }}
- A name for cylindrical CIELab (CIELChab), employed by chroma.js.
- "HCL" designed in 2005 by Sarifuddin and Missaou, which is a transformation of whatever type of RGB color space is in use.{{cite conference |url=http://pdfs.semanticscholar.org/206c/a4c4bb4a5b6c7b614b8a8f4461c0c6b87710.pdf |archive-url=https://web.archive.org/web/20190220074017/http://pdfs.semanticscholar.org/206c/a4c4bb4a5b6c7b614b8a8f4461c0c6b87710.pdf |url-status=dead |archive-date=2019-02-20 |first1=M. |last1=Sarifuddin |name-list-style=amp |first2=Rokia |last2=Missaoui |title=A New Perceptually Uniform Color Space with Associated Color Similarity Measure for Content-Based Image and Video Retrieval |date=2005 |s2cid=17570716 |conference=Multimedia Information Retrieval Workshop, 28th Annual ACM SIGIR Conference}}. [https://www.semanticscholar.org/paper/206ca4c4bb4a5b6c7b614b8a8f4461c0c6b87710 Abstract]/[http://w3.uqo.ca/missaoui/Publications/TRColorSpace.zip long-form corrected report]
- HCT with tone as a synonym for luminance is then used within Material Design for its color system, using value ranges of 0–360°, 0–120+ and 0–100%, respectively.[https://m3.material.io/styles/color/system/how-the-system-works Material Design 3: Defining colors with hue, chroma, and tone (HCT)] Its hue and chroma come from CAM16, whereas tone is actually L* from CIELab.{{cite web|url=https://material.io/blog/science-of-color-design |title= The Science of Color & Design | date=2022-02-17 | author = James O'Leary | website= Material Design Blog}}
{{multiple image
| width = 150
| image1 = SRGB gamut within CIELCHab color space mesh.webm
| alt1 = SRGB gamut in CIELCHab space
| thumbtime1 = 0
| image2 = SRGB gamut within CIELCHuv color space mesh.webm
| alt2 = SRGB gamut in CIELCHuv space
| thumbtime2 = 0
| footer = The sRGB gamut plotted within the cylindrical CIELCh color spaces. L is the vertical axis; C is the cylinder radius; h is the angle around the circumference. Left: CIELChab; right: CIELChuv
}}
Derivation
= Color-making attributes =
{{See also|Color vision}}
HCL concerns the following attributes of color appearance:{{refn|group=upper-alpha |"Clearly, if color appearance is to be described in a systematic, mathematical way, definitions of the phenomena being described need to be precise and universally agreed upon."Fairchild (2005), [https://books.google.com/books?id=8_TxzK2B-5MC&pg=PT106 {{nobr|pp. 83–93}}]}}
; Hue: The "attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors: red, yellow, green, and blue, or to a combination of two of them".
; Lightness, value: The "brightness relative to the brightness of a similarly illuminated white".
; Luminance (Y or Lv,Ω): The radiance weighted by the effect of each wavelength on a typical human observer, measured in SI units in candela per square meter ({{nowrap|cd/m2}}). Often the term luminance is used for the relative luminance, Y/Yn, where Yn is the luminance of the reference white point.
; Colorfulness: The "attribute of a visual sensation according to which the perceived color of an area appears to be more or less chromatic".
The HSL and HSV color spaces are more intuitive translations of the RGB color space, because they provide a single hue number. However, their luminance variation does not match the way humans perceive color. Perceptually uniform color spaces outperform RGB in cases such as high noise environments.{{cite journal | last1 = Paschos | first1 = G. | year = 2001 | title = Perceptually Uniform Color Spaces for Color Texture Analysis: An Empirical Evaluation | journal = IEEE Transactions on Image Processing | volume = 10 | issue = 6 | pages = 932–937 | doi = 10.1109/83.923289| bibcode = 2001ITIP...10..932P }}
= CIE color spaces =
CIE-based LCh color spaces are transformations of the two chroma values (ab or uv) into the polar coordinate. The source color spaces are still very well-regarded for their uniformity, and the transformation does not cause degradation in this aspect. See the respective articles for how the underlying coordinates are derived.
= Sarifuddin 2005 =
Sarifuddin, noting the lack of blue hue consistency of CIELAB—a common complaint among its users—{{cite journal | last1 = McLellan | first1 = M. R. | last2 = Lind | first2 = L. R. | last3 = Kime | first3 = R. W. | year = 1995 | title = Hue Angle Determinations and Statistical Analysis for Multiquadrant Hunter L,a,b Data| journal = Journal of Food Quality | volume = 18 | issue = 3 | pages = 235–240 | doi = 10.1111/j.1745-4557.1995.tb00377.x| doi-access = free }} decided to make their own color space by mashing up some of the features.
According to the Stack Overflow user Tatarize, what Sarifuddin proposes as "HCL" is algorithmically similar to HSL. While pointing out advantages in computational efficiency, they argue that Sarifuddin's work does not represent a significant improvement over the CIELAB color space while showing failure to reproduce the paper's claims.{{cite web |author1=tatarize |title=HCL color to RGB and backward |url=https://stackoverflow.com/a/11969277 |website=Stack Overflow}}{{cite web |author=Tatarize|title=HCL: a new Color Space for a pack of lies. |url=http://godsnotwheregodsnot.blogspot.com/2012/09/hcl-new-color-space-for-pack-of-lies.html |website=Ssnot! |access-date=22 May 2019 |date=4 September 2012}} They also propose what they consider to be an improved version of Sarifuddin's algorithm.{{Cite web|title=algorithm - HCL color to RGB and backward|url=https://stackoverflow.com/questions/7530627/hcl-color-to-rgb-and-backward|access-date=2020-12-08|website=Stack Overflow}}{{Original research inline|date=December 2020|certain=yes}}
= Other color appearance models =
In general, any color appearance model with a lightness and two chroma components can also be transformed into a HCL-type color space by turning the chroma components into polar coordinates.
Implementations
CIELCh has been implemented in a wide range of ways: as programmatic code for generating color swatches in statistics tools, as standalone tools for designing and testing swatches, or as libraries that allow other programs to use the color space. Some implementations include:
- Statistical tools:
- d3.js: Data Driven Documents JavaScript library (CIELChab)
- Swatch designs:
- The colorspace package for the R{{cite web |title=colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes |url=https://cran.r-project.org/package=colorspace |website=The Comprehensive R Archive Network| date=23 January 2023 }} and the Python programming languages,{{cite web |title=Welcome to python-colorspace's documentation! |url=https://python-colorspace.readthedocs.io/en/latest/ |website=Read the Docs}} also with pre-made sets of swatches in hclwizard{{cite web |title=HCL Wizard |url=https://hclwizard.org/}}
- Fabio Crameri's scientific colour maps,{{cite web |title=Scientific colour maps |url=https://www.fabiocrameri.ch/colourmaps/ |publisher=Fabio Crameri}} a set of pre-made swatches
- Library:
- The aforementioned colorspace package (CIELChuv)
- ac-colors JavaScript library{{cite web |title=ac-colors |url=https://github.com/vinaypillai/ac-colors |website=GitHub}} (CIELChab and CIELChuv)
- chroma.js JavaScript library{{cite web |title=Chroma.js |url=https://github.com/gka/chroma.js |website=GitHub}} (CIELChab)
- colorio for Python{{cite web |title=colorio |url=https://pypi.org/project/colorio/ |website=PyPI}}
- Most other color space libraries handle at least one of CIELUV or CIELAB
References
{{notelist-ua}}
{{reflist}}
External links
- [https://hclwizard.org/ HCL Wizard online color apps]
- [https://colorspace.R-Forge.R-project.org/ colorspace: HCL-Based Color Tools and Palettes in R]
- [http://tools.medialab.sciences-po.fr/iwanthue/theory.php Generating random colors]
- [http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/ How To Avoid Equidistant HSV Colors]
- [http://cscheid.net/2012/02/16/hcl-color-space-blues.html Color Space Blues]
- [https://cscheid.github.io/lux/demos/hcl/hcl.html HCL demo]
{{color space|state=expanded}}