Jump to content

User:Aamleshi/sandbox

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Aamleshi (talk | contribs) at 22:13, 5 May 2017 (more changes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

HCL (Hue-Chroma-Luminance) is a commonly used alternative name for the L*C*h(uv) color space, also known as the cylindrical representation or polar CIELUV. It is a color space model designed to accord with human perception of color. HCL has been adopted by information visualization practitioners to present data without the bias implicit in using varying saturation.[1][2]

Overview

The sRGB gamut plotted within the cylindrical CIE LChuv color space. L is the vertical axis; C is the cylinder radius; h is the angle around the circumference.

HCL is designed to have characteristics of both cylindrical translations of RGB color space such as HSL and HSV and L*a*b* color space. [3] HSL and HSV color spaces have the benefit of being perceptually uniform translations of the RGB color space, but their luminance variation does not match the way humans perceive color. L*a*b colorspace does correspond to the three channels of human perception, but have poor hue constancy, especially in the blue range.

HCL uses the LUV model defined by the International Commission on Illumination (CIE) in 1976, translated into polar coordinates. LUV is designed to be perceptually uniform, but the uv coordinates are not very intuitive. HCL preserves the L (luminance) axis of Luv, but transforms uv to polar coordinates, where the distance from zero is the chroma (an alternative measure of colorfulness), and the phase (angle) is our familiar hue. The older Munsell color system is based on different mathematics, but has some similarity to HCL.

Derivation

Color-making attributes

See also: Color vision

The dimensions of the HSL and HSV geometries—simple transformations of the not-perceptually-based RGB model—are not directly related to the photometric color-making attributes of the same names, as defined by scientists such as the CIE or ASTM. Nonetheless, it is worth reviewing those definitions before leaping into the derivation of our models.

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".
Radiance (Le,Ω)
The radiant power of light passing through a particular surface per unit solid angle per unit projected area, measured in SI units in watt per steradian per square metre (W·sr−1·m−2).
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 (cd/m2). Often the term luminance is used for the relative luminanceY/Yn, where Yn is the luminance of the reference white point.
Luma (Y′)
The weighted sum of gamma-corrected R′, G′, and B′ values, and used in Y′CbCr, for JPEG compression and video transmission.
Brightness
The "attribute of a visual sensation according to which an area appears to emit more or less light".
Lightness, value
The "brightness relative to the brightness of a similarly illuminated white".
Colorfulness
The "attribute of a visual sensation according to which the perceived color of an area appears to be more or less chromatic".
Chroma
The "colorfulness relative to the brightness of a similarly illuminated white".
Saturation
The "colorfulness of a stimulus relative to its own brightness".

Brightness and colorfulness are absolute measures, which usually describe the spectral distribution of light entering the eye, while lightness and chroma are measured relative to some white point, and are thus often used for descriptions of surface colors, remaining roughly constant even as brightness and colorfulness change with different illuminationSaturation can be defined as either the ratio of colorfulness to brightness or of chroma to lightness.

Transformation from RGB to HCL

Hue:

if ((R−G) < 0 and (G−B) ≥ 0), then H = 180+H

if ((R−G) < 0 and (G−B) < 0), then H = H −180

Chroma:

Luminance:

Q is a tuning parameter that varies luminosity between a highly saturated color and white.

corresponds to the correction factor in L*a*b*

Implementations

d3.js Data Driven Documents JavaScript library

HCL colorspace for the R statistical programming language

The chroma.js JavaScript library

Other uses of HCL acronym

The terms hue, chroma and luminance or lightness can, of course, be used in other contexts. Thus a discussion of HCL may not refer specifically to cylindrical LAB

Some sources use HCL to refer to polar representation of LUV, not LAB.

References

  1. ^ Ihaka R. "Colour for Presentation Graphics".
  2. ^ Zeileis, Achim; Hornik, Kurt. "Choosing Color Palettes for Statistical Graphics". Vienna University of Economics and Business. Retrieved 2015-10-20.
  3. ^ [1] M. Sarifuddin and Rokia Missaoui, A New Perceptually Uniform Color Space with Associated Color Similarity Measure for Content-Based Image and Video Retrieval