Hls Color Space

The HLS color space, also called HSL, stands for Hue, Saturation, Lightness (also Luminance or Luminosity). While HSV (Hue, Saturation, Value) can be viewed graphically as a color cone or hexcone, HSL is drawn as a double cone or double hexcone. Both systems are non-linear deformations of the RGB colour cube. The two apexes of the HLS double hexcone correspond to black and white. The angular parameter corresponds to hue, distance from the axis corresponds to saturation, and distance along the black-white axis corresponds to lightness.

Converting from RGB

Both the HSL color space and the HSV color space have a common definition of hue, but not saturation and lightness/value. HSL:
lign="right"| saturation = \max \{R,G,B\} - \min \{R,G,B\}
lign="right"| lightness = \frac{\max \{R,G,B\} + \min \{R,G,B\}}{2}
HSV:
lign="right"| saturation = \frac{\max\{R,G,B\} - \min\{R,G,B\}}{\max\{R,G,B\}}
lign="right"| value = \max \{R,G,B\}

Comparison of HSL and HSV

HSL is similar to HSV but better reflects the intuitive notion of saturation and lightness as two independent parameters, and is therefore more suitable for use by artists. The CSS3 specification from the W3C states, "Advantages of HSL are that it is symmetrical to lightness and darkness (which is not the case with HSV for example)..." This means that:
  • In HSL, the Saturation component always goes from fully saturated color to the equivalent gray (in HSV, with V at maximum, it goes from saturated color to white, which may be considered counterintuitive).
  • The Lightness in HSL always spans the entire range from black through the chosen hue to white (in HSV, the V component only goes half that way, from black to the chosen hue).
In software, a hue-based color model (HSV or HSL) is usually presented to the user in the form of a linear or circular hue chooser and a two-dimensional area (usually a square or a triangle) where you can choose saturation and value/lightness for the selected hue. With this representation, the difference between HSV or HSL is irrelevant. However, many programs also let you select a color via linear sliders or numeric entry fields, and for those controls, usually either HSL or HSV (not both) are used. HSV is traditionally more common. Here are some examples:

Examples

RGB>
lign=center|HSL align=center|HSV align=center|Result
1, 0, 0) (0°, 1, 0.5) (0°, 1, 1) style="background:#ff0000;" |                   
0.5, 1, 0.5) (120°, 0.5, 0.75) (120°, 0.5, 1) style="background:#80ff80;" |                   
0, 0, 0.5) (240°, 0.5, 0.5) (240°, 1, 0.5) style="background:#000080;" |    

See also

External link

 

<< PreviousWord BrowserNext >>
lappeenranta
herminie cadolle
singapore area licensing scheme
trondheim toll scheme
list of amiga games
list of u.s. virgin islands governors
bernard malamud
mediterranean gull
isam
list of guam governors
algonquin
list of governors of new hampshire
canuck
burebista
hiisi
list of governors of virginia
list of governors of pennsylvania
list of governors of rhode island
list of american samoa governors
dbeln (district)
hempstead
daniel butterfield
louisville bats
fagin
henrico
calculus (dental)
hollis
holly (disambiguation)
howell
robert budde
eugeen van mieghem
hurricane (disambiguation)
roger fisher
rgba color space
marble hill
informix 4gl
marble hill, manhattan, new york
margaret buffie
new world porcupine
bonnie burnard
operation tonga
the bridge
operation neptune
operation gambit