Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HSL and HSV
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Disadvantages== {{multiple image | align = right | image1 = srgb-in-cielab.png | width1 = 197 | alt1 = | caption1 = Fig 20a. The [[sRGB]] gamut mapped in CIELAB space. Notice that the lines pointing to the red, green, and blue primaries are not evenly spaced by [[hue angle]], and are of unequal length. The primaries also have different ''L''* values. | image2 = adobergb-in-cielab.png | width2 = 197 | alt2 = | caption2 = Fig 20b. The [[Adobe RGB color space|Adobe RGB]] gamut mapped in CIELAB space. Also notice that these two RGB spaces have different gamuts, and thus will have different HSL and HSV representations. | footer = }} While HSL, HSV, and related spaces serve well enough to, for instance, choose a single color, they ignore much of the complexity of color appearance. Essentially, they trade off perceptual relevance for computation speed, from a time in computing history (high-end 1970s graphics workstations, or mid-1990s consumer desktops) when more sophisticated models would have been too computationally expensive.{{refn|group=upper-alpha |Most of the disadvantages below are listed in [[#Poynton|Poynton (1997)]], though as mere statements, without examples.}} HSL and HSV are simple transformations of RGB which preserve symmetries in the RGB cube unrelated to human perception, such that its ''R'', ''G'', and ''B'' corners are equidistant from the neutral axis, and equally spaced around it. If we plot the RGB gamut in a more perceptually-uniform space, such as [[CIELAB]] (see [[#Other cylindrical-coordinate color models|below]]), it becomes immediately clear that the red, green, and blue primaries do not have the same lightness or chroma, or evenly spaced hues. Furthermore, different RGB displays use different primaries, and so have different gamuts. Because HSL and HSV are defined purely with reference to some RGB space, they are not [[absolute color space]]s: to specify a color precisely requires reporting not only HSL or HSV values, but also the characteristics of the RGB space they are based on, including the [[gamma correction]] in use. If we take an image and extract the hue, saturation, and lightness or value components, and then compare these to the components of the same name as defined by color scientists, we can quickly see the difference, perceptually. For example, examine the following images of a fire breather ({{nobr|fig. 13}}). The original is in the sRGB colorspace. CIELAB ''L''* is a CIE-defined achromatic lightness quantity (dependent solely on the perceptually achromatic luminance ''Y'', but not the mixed-chromatic components ''X'' or ''Z'', of the CIEXYZ colorspace from which the sRGB colorspace itself is derived), and it is plain that this appears similar in perceptual lightness to the original color image. Luma is roughly similar, but differs somewhat at high chroma, where it deviates most from depending solely on the true achromatic luminance (''Y'', or equivalently ''L''*) and is influenced by the colorimetric chromaticity (''x,y'', or equivalently, ''a*,b*'' of CIELAB). HSL ''L'' and HSV ''V'', by contrast, diverge substantially from perceptual lightness. {{clear}} {{multiple image | align = center | image1 = Fire breathing 2 Luc Viatour.jpg | width1 = 220 | alt1 = A full-color image shows a high-contrast and quite dramatic scene of a fire breather with a large orange-yellow flame extending from his lips. He wears dark but colorful orange-red clothing. | caption1 = Fig. 13a. Color photograph (sRGB colorspace). | image2 = Fire-breather CIELAB L*.jpg | width2 = 220 | alt2 = A grayscale image showing the CIELAB lightness component of the photograph appears to be a faithful rendering of the scene: it looks roughly like a black-and-white photograph taken on panchromatic film would look, with clear detail in the flame, which is much brighter than the man's outfit or the background. | caption2 = Fig. 13b. CIELAB ''L''* (further transformed back to sRGB for consistent display). | image3 = Fire-breather 601 Luma Y'.jpg | width3 = 220 | alt3 = A grayscale image showing the luma appears roughly similar to the CIELAB lightness image, but is a bit brighter in areas which were originally very colorful. | caption3 = Fig. 13c. Rec. 601 luma {{nobr|''Y'''}}. | footer = }} {{multiple image | align = center | image1 = Fire-breather mean(R,G,B) I.jpg | width1 = 220 | alt1 = A grayscale image showing the component average (HSI intensity) of the photograph is much a less convincing facsimile of the color photograph, with reduced contrast, especially with its flame darker than in the original. | caption1 = Fig. 13d. Component average: "intensity" ''I''. | image2 = Fire-breather HSV V.jpg | width2 = 220 | alt2 = A grayscale image showing the HSV value component of the photograph leaves the flame completely white (in photographer's parlance, "blown out"), and the man's clothing much too bright. | caption2 = Fig. 13e. HSV value ''V''. | image3 = Fire-breather HSL L.jpg | width3 = 220 | alt3 = A grayscale image showing the HSL lightness component of the photograph renders the flame, as approximately middle gray, and ruins the dramatic effect of the original by radically reducing its contrast. | caption3 = Fig. 13f. HSL lightness ''L''. | footer = }} [[File:Hsv-hues-cf-lch-hues.png|thumb|Fig 20c. 12 points on the HSV color wheel in a [[CIELAB]] chroma plane, showing HSV's lack of uniformity in hue and saturation.]] Though none of the dimensions in these spaces match their perceptual analogs, the ''value'' of HSV and the ''saturation'' of HSL are particular offenders. In HSV, the blue primary {{colorsample2|#0000FF}} and white {{colorsample2|#FFFFFF}} are held to have the same value, even though perceptually the blue primary has somewhere around 10% of the luminance of white (the exact fraction depends on the particular RGB primaries in use). In HSL, a mix of 100% red, 100% green, 90% blue – that is, a very light yellow {{colorsample2|#FFFFE5}} – is held to have the same saturation as the green primary {{nobr|{{colorsample2|#00FF00}},}} even though the former color has almost no chroma or saturation by the conventional psychometric definitions. Such perversities led Cynthia Brewer, expert in color scheme choices for maps and information displays, to tell the [[American Statistical Association]]: {{quote|Computer science offers a few poorer cousins to these perceptual spaces that may also turn up in your software interface, such as HSV and HLS. They are easy mathematical transformations of RGB, and they seem to be perceptual systems because they make use of the hue–lightness/value–saturation terminology. But take a close look; don't be fooled. Perceptual color dimensions are poorly scaled by the color specifications that are provided in these and some other systems. For example, saturation and lightness are confounded, so a saturation scale may also contain a wide range of lightnesses (for example, it may progress from white to green which is a combination of both lightness and saturation). Likewise, hue and lightness are confounded so, for example, a saturated yellow and saturated blue may be designated as the same 'lightness' but have wide differences in perceived lightness. These flaws make the systems difficult to use to control the look of a color scheme in a systematic manner. If much tweaking is required to achieve the desired effect, the system offers little benefit over grappling with raw specifications in RGB or CMY.<ref>{{cite conference |url=http://www.personal.psu.edu/cab38/ColorSch/ASApaper.html |title=Color Use Guidelines for Data Representation |first=Cynthia A. |last=Brewer |date=1999 |book-title=Proceedings of the Section on Statistical Graphics |location=Alexandria, VA |publisher=American Statistical Association |pages=55–60 |access-date=2010-02-05 |archive-date=2009-08-07 |archive-url=https://web.archive.org/web/20090807105257/http://www.personal.psu.edu/cab38/ColorSch/ASApaper.html |url-status=dead }}</ref>}} If these problems make HSL and HSV problematic for choosing colors or color schemes, they make them much worse for image adjustment. HSL and HSV, as Brewer mentioned, confound perceptual color-making attributes, so that changing any dimension results in non-uniform changes to all three perceptual dimensions, and distorts all of the color relationships in the image. For instance, rotating the hue of a pure dark blue {{colorsample2|#002BA6}} toward green {{colorsample2|#0087A6}} will also reduce its perceived chroma, and increase its perceived lightness (the latter is grayer and lighter), but the same hue rotation will have the opposite impact on lightness and chroma of a lighter bluish-green – {{colorsample2|#00D6AF}} to {{colorsample2|#00D639}} (the latter is more colorful and slightly darker). In the example below ({{nobr|fig. 21}}), the image (a) is the original photograph of a [[green turtle]]. In the image (b), we have rotated the hue (''H'') of each color by {{nowrap|−30°}}, while keeping HSV value and saturation or HSL lightness and saturation constant. In the image right (c), we make the same rotation to the HSL/HSV hue of each color, but then we force the CIELAB lightness (''L''*, a decent approximation of perceived lightness) to remain constant. Notice how the hue-shifted middle version without such a correction dramatically changes the perceived lightness relationships between colors in the image. In particular, the turtle's shell is much darker and has less contrast, and the background water is much lighter. Image (d) uses CIELAB to hue shift; the difference from (c) demonstrates the errors in hue and saturation. {{clear}} {{multiple image | align = center | image1 = Hawaii turtle 2.JPG | width1 = 220 | alt1 = | caption1 = Fig. 21a. Color photograph. | image2 = Hawaii-turtle hue shifted.jpg | width2 = 220 | alt2 = | caption2 = Fig. 21b. HSL/HSV hue of each color shifted by {{nowrap|−30°}}. | image3 = Hawaii-turtle hue shifted with constant L*.jpg | width3 = 220 | alt3 = | caption3 = Fig. 21c. Hue shifted but CIELAB lightness (''L''*) kept as in the original. | image4 = Hawaii turtle 2 hue shifted lch.JPG | width4 = 220 | alt4 = | caption4 = Fig. 21d. Hue shifted in CIELch(ab) color space by {{nowrap|−30°}}. | footer = }} Because hue is a circular quantity, represented numerically with a discontinuity at 360°, it is difficult to use in statistical computations or quantitative comparisons: analysis requires the use of [[directional statistics|circular statistics]].<ref>{{cite book | first = Nicholas | last = Fisher | year = 1993 | url = https://archive.org/details/statisticalanaly0000fish_v6v2/ |url-access=limited | title = Statistical Analysis of Circular Dat | publisher = Cambridge University Press |doi=10.1017/CBO9780511564345 | isbn = 978-0-521-35018-1 }}</ref> Furthermore, hue is defined piecewise, in 60° chunks, where the relationship of lightness, value, and chroma to ''R'', ''G'', and ''B'' depends on the hue chunk in question. This definition introduces discontinuities, corners which can plainly be seen in horizontal slices of HSL or HSV.<ref>{{cite conference | first = Allan | last = Hanbury | year = 2003 | citeseerx = 10.1.1.4.1381 | title = Circular Statistics Applied to Colour Images | conference = 8th Computer Vision Winter Workshop}}</ref> Charles Poynton, digital video expert, lists the above problems with HSL and HSV in his ''Color FAQ'', and concludes that: {{quote|HSB and HLS were developed to specify numerical Hue, Saturation and Brightness (or Hue, Lightness and Saturation) in an age when users had to specify colors numerically. The usual formulations of HSB and HLS are flawed with respect to the properties of color vision. Now that users can choose colors visually, or choose colors related to other media (such as [[Pantone|PANTONE]]), or use perceptually-based systems like [[CIELUV|L*u*v*]] and [[CIELAB|L*a*b*]], HSB and HLS should be abandoned.<ref>[[#Poynton|Poynton (1997)]]. [http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC36 "What are HSB and HLS?"]</ref>}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)