Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.7 KB

topic-cylindrical-spaces.md

File metadata and controls

40 lines (24 loc) · 1.7 KB

Cylindrical color spaces

Many of the color spaces also have their cylindrical equivalents (sometimes also called "polar" equivalents). A cylindrical color space usually consists of three channels:

  • Lightness channel, often denoted as "L"
  • Chroma (also chrominance or colourfulness) channel, often denoted as "C"
  • Hue channel, often denoted as "h"

The lightness and chroma channels have different ranges depending on the color space (some use 0 to 100, some use 0 to 1, etc.)

The hue channel is specified in degrees, and has values from 0° to 360°.

Color spaces with cylindrical equivalents

These are some of the color spaces that are built-in and have cylindrical equivalent:

Helper formulas

If you want to experiment with cylindrical representations, you can explore the formulas available on the CylindricalFormulas static helper class.

It provides methods like:

  • GetSaturation that computes saturation from chroma and lightness.
  • GetChroma that computes chroma from saturation and lightness.
  • ConvertToLCh that can convert a vector with lightness and two color channels into lightness, chroma, hue vector.
  • ConvertFromLCh that can convert a vector with lightness, chroma, and hue into and a vector with lightness and two color channels.

Related links