Misplaced Pages

HSLuv

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Color space for computer displays
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article's use of external links may not follow Misplaced Pages's policies or guidelines. Please improve this article by removing excessive or inappropriate external links, and converting useful links where appropriate into footnote references. (March 2019) (Learn how and when to remove this message)
The topic of this article may not meet Misplaced Pages's general notability guideline. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.
Find sources: "HSLuv" – news · newspapers · books · scholar · JSTOR (August 2019) (Learn how and when to remove this message)
(Learn how and when to remove this message)

In colorimetry, the HSLuv color space is a human-friendly alternative to the HSL color space. It was formerly known as "husl". It is a variation of the CIE LCH(uv) color space, where the C (colorfulness) component is replaced by a "Saturation" (S) component representing the colorfulness percentage relative to the maximum sRGB can provide given the L and H values. The value has nothing to do with "saturation" in color theory.

History

The color spaces used widely for computer display, such as standard Red Green Blue (sRGB) (and the color models built on it like HSL and HSV) are irregular, which means that even though the rectangles have evenly spaced hue values, the corresponding effect is not linear to the human eye.

The CIELUV color space was designed for perceptual uniformity, based on human experiments, and was adopted in 1976 by the International Commission on Illumination (CIE) as a simple-to-compute transformation of the 1931 CIE XYZ color space. CIELUV has been extensively used for applications such as computer graphics which deal with colored lights. Although additive mixtures of different colored lights will fall on a line in CIELUV's uniform chromaticity diagram (dubbed the CIE 1976 UCS), such additive mixtures will not, contrary to popular belief, fall along a line in the CIELUV color space unless the mixtures are constant in lightness. When accessed by polar coordinates, CIELUV becomes functionally similar to the HSL color space, with the problem that its chroma component doesn't fit into a specific range. Even though CIELUV and CIELAB color spaces are based on human perception, they are not intuitive when working in code.

By extending CIELUV with a new "saturation" component, HSLuv now allows spanning all of the available chroma as a percentage. The HSLuv project is one of the more recent attempts at making these color spaces more intuitive. It allows you to use the CIELUV color space in the same dimensions as the HSL color model. Referred to as a human-friendly HSL, the original code was written in the Haxe programming language, but the project is now implemented in most of the popular programming languages, including JavaScript.

Implementation

The reference implementation is written in Haxe and released under the MIT license.

HSLuv has been ported to the following computer languages: C, C#, Elm, Emacs, GLSL, Haskell, Haxe, Go, Java, JavaScript, Lua, Objective-C, Perl, PHP, Python, Ruby, Rust, Sass, and Swift.

See also

References

  1. "Using circular color systems". seaborn.pydata.org.
  2. ^ "Perceptually uniform color spaces". programmingdesignsystems.com.
  3. "Info". www.hsluv.org.
  4. "Implementations". www.hsluv.org.

External links

  • Explanation of differences between sRGB and HSLuv color spaces with comparisons and Javascript examples.
  • Javascript implementation of HSLuv with math, examples, comparisons, and links to implementations in various programming languages.
Color space
CAM
CIE
RGB
Y′UV
Other
Color systems
and standards
For the vision capacities of organisms or machines, see  Color vision.
Category: