Absolute continuity: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>DVdm
m Inappropriate external links per wp:ELNO item 12 (HG)
en>UKoch
m Definition: math formulae
Line 1: Line 1:
{{Technical|date=December 2013}}
Luke is usually a superstar within the building as well as the vocation growth initial 2nd to his 3rd casio album,  And , will be the resistant. He burst to the picture in 2013 along with his best blend of downward-residence convenience, movie celebrity fantastic looks and    [http://lukebryantickets.omarfoundation.org tickets to luke bryan concert] words, is placed t in the major way. The latest recording  Top around the nation graph or chart and #2 in the pop charts, creating it the next maximum first appearance at that time of 2014 to get a land performer. <br><br>
[[File:Hsl-hsv models.svg|thumb|right|400px|Fig. 1. HSL (a–d) and HSV (e–h). Above (a, e): cut-away 3D models of each. Below: two-dimensional plots showing two of a model’s three parameters at once, holding the other constant: cylindrical shells (b, f) of constant saturation, in this case the outside surface of each cylinder; horizontal cross-sections (c, g) of constant HSL lightness or HSV value, in this case the slices halfway down each cylinder; and rectangular vertical cross-sections (d, h) of constant hue, in this case of hues 0° red and its complement 180° cyan.]]


'''HSL''' and '''HSV''' are the two most common [[cylindrical coordinate system|cylindrical-coordinate]] representations of points in an [[RGB color model]].  The two representations rearrange the geometry of RGB in an attempt to be more intuitive and [[color vision|perceptually]] relevant than the [[cartesian coordinate system|cartesian]] (cube) representation. Developed in the 1970s for [[computer graphics]] applications, HSL and HSV are used today in [[color tool|color pickers]], in [[image editing]] software, and less commonly in [[image analysis]] and [[computer vision]].
The boy of your , is aware of patience and dedication are key elements with regards to an excellent job- . His to start with recordingStay Me, made the Top hits “All My Buddies “Country and Say” Person,” although  cheap tickets for luke bryan ([http://lukebryantickets.sgs-suparco.org relevant internet site]) his  effort, Doin’  Issue, located the artist-3 direct No. 2 single people:  In addition Contacting Is really a Excellent Thing.<br><br>During the tumble of 2011tickets for sale - [http://www.ladyhawkshockey.org www.ladyhawkshockey.org], Concert tours: Bryan And which had an impressive set of , which includes City. “It’s much like you’re getting a   authorization to travel one stage further, says these performers that were a part of the Tourabove in to a greater amount of designers.” It packaged among the most successful  excursions within its 10-year background.<br><br>Also visit my web site; [http://lukebryantickets.hamedanshahr.com luke bryan tickets]
 
HSL stands for ''hue'', ''saturation'', and ''lightness'', and is often also called '''HLS'''. HSV stands for ''hue'', ''saturation'', and ''value'', and is also often called '''HSB''' (''B'' for ''brightness''). A third model, common in computer vision applications, is '''HSI''', for ''hue'', ''saturation'', and ''intensity''. However, while typically consistent, these definitions are not standardized, and any of these abbreviations might be used for any of these three or several other related cylindrical models. (For technical definitions of these terms, see [[#Color-making attributes|below]].)
 
In each cylinder, the angle around the central vertical axis corresponds to "[[hue]]", the distance from the axis corresponds to "[[colorfulness|saturation]]", and the distance along the axis corresponds to "[[lightness]]", "value" or "[[brightness]]". Note that while "hue" in HSL and HSV refers to the same attribute, their definitions of "saturation" differ dramatically. Because HSL and HSV are simple transformations of device-dependent RGB models, the physical colors they define depend on the colors of the red, green, and blue [[primary color|primaries]] of the device or of the particular RGB space, and on the [[gamma correction]] used to represent the amounts of those primaries. Each unique RGB device therefore has unique HSL and HSV spaces to accompany it, and numerical HSL or HSV values describe a different color for each basis RGB space.<ref>See [[Absolute color space]].</ref>
 
Both of these representations are used widely in computer graphics, and one or the other of them is often more convenient than RGB, but both are also criticized for not adequately separating color-making attributes, or for their lack of perceptual uniformity. Other more computationally intensive models, such as [[CIELAB]] or [[CIECAM02]] are said to better achieve these goals.
 
== Basic principle ==
 
{{double image|right|HSL color solid cylinder alpha lowgamma.png|197|HSV color solid cylinder alpha lowgamma.png|197|Fig. 2a. HSL cylinder|Fig. 2b. HSV cylinder}}
 
HSL and HSV are both cylindrical geometries ({{nobr|fig. 2}}), with hue, their angular dimension, starting at the [[red]] [[primary color|primary]] at 0°, passing through the [[green]] primary at 120° and the [[blue]] primary at 240°, and then wrapping back to red at 360°. In each geometry, the central vertical axis comprises the ''neutral'', ''achromatic'', or ''gray'' colors, ranging from black at lightness 0 or value 0, the bottom, to white at lightness 1 or value 1, the top. In both geometries, the [[additive color|additive]] primary and [[secondary color]]s – red, [[yellow]], green, [[cyan]], blue, and [[magenta]] – and linear mixtures between adjacent pairs of them, sometimes called ''pure colors'', are arranged around the outside edge of the cylinder with saturation 1; in HSV these have value 1 while in HSL they have lightness ½. In HSV, mixing these pure colors with white – producing so-called ''[[tints and shades|tints]]'' – reduces saturation, while mixing them with black – producing ''[[tints and shades|shades]]'' – leaves saturation unchanged. In HSL, both tints and shades have full saturation, and only mixtures with both black and white – called ''tones'' – have saturation less than 1.
 
{{double image|right|HSL color solid dblcone chroma gray.png|197|HSV color solid cone chroma gray.png|197|Fig. 3a–b. If we plot hue and (a) HSL lightness or (b) HSV value against [[#Hue and chroma|chroma]] rather than saturation, the resulting solid is a [[bicone]] or [[Cone (geometry)|cone]], respectively, not a cylinder. Such diagrams often claim to represent HSL or HSV directly, with the chroma dimension deceptively labeled "saturation".}}
 
Because these definitions of saturation – in which very dark (in both models) or very light (in HSL) near-neutral colors, for instance {{colorsample2|#330000}} or {{nobr|{{colorsample2|#FFEEFF}},}} are considered fully saturated – conflict with the intuitive notion of color purity, often a conic or bi-conic solid is drawn instead ({{nobr|fig. 3}}), with what this article calls ''chroma'' as its radial dimension, instead of saturation. Confusingly, such diagrams usually label this radial dimension "saturation", blurring or erasing the distinction between saturation and chroma.<ref>In [[#Joblove|Joblove and Greenberg’s (1978)]] paper first introducing HSL, they called HSL lightness "intensity", called HSL saturation "relative chroma", called HSV saturation "saturation" and called HSV value "value". They carefully and unambiguously described and compared three models: hue/chroma/intensity, hue/relative chroma/intensity, and hue/value/saturation. Unfortunately, later authors were less fastidious, and current usage of these terms is inconsistent and often misleading.</ref> [[#Formal derivation|As described below]], computing chroma is a helpful step in the derivation of each model. Because such an intermediate model – with dimensions hue, chroma, and HSV value or HSL lightness – takes the shape of a cone or bicone, HSV is often called the "hexcone model" while HSL is often called the "bi-hexcone model" ([[#Color-making attributes|{{nobr|fig. 8}}]]).<ref>The name ''hexcone'' for hexagonal pyramid was coined in [[#Smith|Smith]], and stuck.</ref>
{{clear}}
 
== Motivation ==
{{multiple image
  | align    = right
| image1    = tint-tone-shade.svg
| width1    = 150
| caption1  = Fig. 4. Painters long mixed colors by combining relatively bright pigments with black and white. Mixtures with white are called ''tints'', mixtures with black are called ''shades'', and mixtures with both are called ''tones''. See [[Tints and shades]].<ref name=Levkowitz>[[#Levkowitz|Levkowitz and Herman]]</ref>
  | alt1      =
| image2    = Ostwald.svg
| width2    = 150
| caption2  = Fig. 5. This 1916 color model by German chemist [[Wilhelm Ostwald]] exemplifies the "mixtures with white and black" approach, organizing 24 "pure" colors into a [[color circle|hue circle]], and colors of each hue into a triangle. The model thus takes the shape of a bicone.<ref>Wilhelm Ostwald (1916). ''Die Farbenfibel''. Leipzig.<br>Wilhelm Ostwald (1918). ''Die Harmonie der Farben''. Leipzig.</ref>
| alt2      = Several paint mixing terms can be arranged into a triangular arrangement: the left edge of the triangle shows ''white'' at its top and ''black'' at its bottom with ''gray'' between the two, each in its respective oval. A ''pure color'' (in this case, a bright blue-green) lies at the right corner of the triangle. On the edge between the pure color and black is a ''shade'' (a darker blue-green), between the pure color and white is a ''tint'' (a lighter, faded blue-green), and a ''tone'' lies in the middle of the triangle (a muted blue-green).
| image3    = Tektronix-hsl-patent-diagram.png
| width3    = 150
| caption3  = Fig. 7. Tektronix graphics terminals used the earliest commercial implementation of HSL, in 1979. This diagram, from a patent filed in 1983, shows the bicone geometry underlying the model.<ref>Gar A. Bergstedt (April 1983). US patent 4694286, [http://www.google.com/patents/about?id=WA8xAAAAEBAJ&dq "Apparatus and method for modifying displayed color images"]. Filed 1983-04-08. Issued 1987-09-15. Assigned to Tektronix, Inc.</ref>
| alt3      = In classic patent application style, this is a black-and-white diagram with the patent name, inventor name, and patent number listed at the top, shaded by crosshatching. This diagram shows a three-dimensional view of Tektronix’s biconic HSL geometry, made up of horizontal circular slices along a vertical axis expanded for ease of viewing. Within each circular slice, saturation goes from zero at the center to one at the margins, while hue is an angular dimension, beginning at blue with hue zero, through red with hue 120 degrees and green with hue 240 degrees, and back to blue.
}}
{{multiple image
| caption1 = Fig. 6a. The RGB gamut can be arranged in a cube.
| width    = 197
| image1    = RGB Cube Show lowgamma cutout a.png
  | alt1      = The RGB cube has black at its origin, and the three dimensions R, G, and B pointed in orthogonal directions away from black. The corner in each of those directions is the respective primary color (red, green, or blue), while the corners further away from black are combinations of two primaries (red plus green makes yellow, red plus blue makes magenta, green plus blue makes cyan). At the cube’s corner farthest from the origin lies white. Any point in the cube describes a particular color within the gamut of RGB.
| image2    = RGB Cube Show lowgamma cutout b.png
| caption2 = Fig. 6b. The same image, with a portion removed for clarity.
| alt2 = The same image, with a portion removed for clarity.
<!--
| image3    = RGB Cube Show lowgamma cutout c.png
-->
}}
 
{{see also|Color theory|RGB color model|RGB color space}}
Most televisions, computer displays, and projectors produce colors by combining red, green, and blue light in varying intensities – the so-called [[RGB color model|RGB]] [[additive color|additive]] [[primary color]]s. The resulting mixtures in [[RGB color space]] can reproduce a wide variety of colors (called a [[gamut]]); however, the relationship between the constituent amounts of red, green, and blue light and the resulting color is unintuitive, especially for inexperienced users, and for users familiar with [[subtractive color]] mixing of paints or traditional artists’ models based on tints and shades ({{nobr|fig. 4}}). Furthermore, neither additive nor subtractive color models define color relationships the same way the [[color vision|human eye]] does.<ref>For instance, a 1982 study by Berk, et al., found that users were better at describing colors in terms of HSL than RGB coordinates, after being taught both systems, but were much better still at describing them in terms of the natural-language CNS model (which uses names such as "very dark grayish yellow-green" or "medium strong bluish purple"). This shouldn’t be taken as gospel however: a 1987 study by Schwarz, et al., found that users could match colors using RGB controls faster than with HSL controls; a 1999 study by Douglas and Kirkpatrick found that the visual feedback in the user interface mattered more than the particular color model in use, for user matching speed.<br>{{cite journal|author=Toby Berk, Arie Kaufman, and Lee Brownston |date=August 1982|url=http://portal.acm.org/citation.cfm?id=358606 |title=A human factors study of color notation systems for computer graphics|journal=Communications of the ACM|volume=25|issue=8|pages=547–550|doi=10.1145/358589.358606}}<br>{{cite journal|author=Michael W. Schwarz, William B. Cowan, and John C. Beatty |date=April 1987|url=http://portal.acm.org/citation.cfm?id=31336.31338 |title=An experimental comparison of RGB, YIQ, LAB, HSV, and opponent color models|journal=ACM Transactions on Graphics|volume=6|issue=2|pages=123–158|doi=10.1145/31336.31338}}<br>{{cite journal|author=Sarah A. Douglas and Arthur E. Kirkpatrick |date=April 1999|url=http://portal.acm.org/citation.cfm?id=318011 |title=Model and representation: the effect of visual feedback on human performance in a color picker interface|doi=10.1145/318009.318011|journal=ACM Transactions on Graphics|volume=18|issue=2|pages= 96–127}}</ref>
 
For example, imagine we have an RGB display whose color is controlled by three [[slider (computing)|sliders]] ranging from {{nobr|0–255}}, one controlling the intensity of each of the red, green, and blue primaries. If we begin with a relatively colorful [[Orange (colour)|orange]] {{nobr|{{colorsample2|#D97621}}}}, with [[sRGB]] values {{nobr|1=''R'' = 217}}, {{nobr|1=''G'' = 118}}, {{nobr|1=''B'' = 33}}, and want to reduce its colorfulness by half to a less saturated orange {{nobr|{{colorsample2|#BA845C}}}}, we would need to drag the sliders to decrease ''R'' by 31, increase ''G'' by 24, and increase ''B'' by 59, as pictured below. Needless to say, these numbers seem mostly arbitrary.
 
:[[File:unintuitive-rgb.png|400px]]
 
In an attempt to accommodate more traditional and intuitive color mixing models, computer graphics pioneers at [[PARC (company)|PARC]] and [[New York Institute of Technology|NYIT]] developed the HSV model in the mid-1970s, formally described by [[Alvy Ray Smith]] in the August 1978 issue of [[Computer Graphics (publication)|''Computer Graphics'']]. In the same issue, Joblove and Greenberg described the HSL model – whose dimensions they labeled ''hue'', ''relative chroma'', and ''intensity'' – and compared it to HSV ({{nobr|fig. 1}}). Their model was based more upon how colors are organized and conceptualized in [[color vision|human vision]] in terms of other color-making attributes, such as hue, lightness, and chroma; as well as upon traditional color mixing methods – e.g., in painting – that involve mixing brightly colored pigments with black or white to achieve lighter, darker, or less colorful colors.
 
The following year, 1979, at [[SIGGRAPH]], [[Tektronix]] introduced graphics terminals using HSL for color designation, and the Computer Graphics Standards Committee recommended it in their annual status report ({{nobr|fig. 7}}). These models were useful not only because they were more intuitive than raw RGB values, but also because the conversions to and from RGB were extremely fast to compute: they could run in real time on the hardware of the 1970s. Consequently, these models and similar ones have become ubiquitous throughout image editing and graphics software since then. Some of their uses are described [[#Use in end-user software|below]].<ref>[[Maureen C. Stone]] (August 2001). [http://graphics.stanford.edu/courses/cs448b-02-spring/04cdrom.pdf "A Survey of Color for Computer Graphics"]. Course at SIGGRAPH 2001.</ref><ref name=Smith>[[#Smith|Smith]]</ref><ref name=Joblove>[[#Joblove|Joblove and Greenberg]]</ref><ref>{{cite journal|author=Ware Myers |date=July 1979|title=Interactive Computer Graphics: Flying High-Part I|journal=Computer|volume=12|issue=7|pages=8–17|doi=10.1109/MC.1979.1658808 }}</ref><ref>{{cite journal|author=N. Magnetat-Thalmann, N. Chourot, and D. Thalmann |date=March 1984|title=Colour Gradation, Shading and Texture Using a Limited Terminal|doi=10.1111/j.1467-8659.1984.tb00092.x|journal=Computer Graphics Forum|volume=3|pages=83}}</ref><ref>{{cite journal|doi=10.1145/988497.988498|title=Status Report of the Graphics Standards Planning Committee|date= August 1979|last1=Computer Graphics Staff|journal=ACM SIGGRAPH Computer Graphics|volume=13|issue=3|pages=1}}</ref>
 
{{clear}}
 
== Formal derivation ==
[[File:Hsl-and-hsv.svg|thumb|right|300px|Fig. 8. The geometric derivation of the cylindrical HSL and HSV representations of an RGB "colorcube".|alt=A flow-chart–like diagram shows the derivation of HSL, HSV, and a luma/chroma/hue model. At the top lies an RGB "color cube", which as a first step is tilted onto its corner so that black lies at the bottom and white at the top. At the next step, the three models diverge, and the height of red, yellow, green, cyan, blue, and magenta is set based on the formula for lightness, value, or luma: in HSV, all six of these are placed in the plane with white, making an upside-down hexagonal pyramid; in HSL, all six are placed in a plane halfway between white and black, making a bipyramid; in the luma/chroma/hue model, the height is determined by the approximate formula luma equals 0.3 times red plus 0.6 times green plus 0.1 times blue. At the next step, each horizontal slice of HSL and HSV is expanded to fill a uniform-width hexagonal prism, while the luma/chroma/hue model is simply embedded in that prism without modification. As a final step, all three models’ hexagonal prisms are warped into cylinders, reflecting the nature of the definition of hue and saturation or chroma. For full details and mathematical formalism, read the rest of this section.]]
 
=== Color-making attributes ===
{{see also|Color vision}}
The dimensions of the HSV and HSL geometries – simple transformations of the not-perceptually-based RGB model – are not directly related to the [[photometry (optics)|photometric]] color-making attributes of the same names, as defined by scientists such as the [[International Commission on Illumination|CIE]] or [[ASTM International|ASTM]]. Nonetheless, it is worth reviewing those definitions before leaping into the derivation of our models.<ref>Mark Fairchild: "Clearly, if color appearance is to be described in a systematic, mathematical way, definitions of the phenomena being described need to be precise and universally agreed upon." For the definitions of color-making attributes which follow, see:<br>[[#Fairchild|Fairchild]] 2005, [http://books.google.com/books?id=8_TxzK2B-5MC&pg=PT106 {{nobr|pp. 83–93}}] (this is the source of the direct quotations).<br>[[#Kuehni|Kuehni]]<br>[[ASTM International|ASTM]] (2009). [http://www.astm.org/Standards/E284.htm ''Standard Terminology of Appearance'']. E284-09a.<br>[[International Commission on Illumination|CIE]] (1987). [http://www.cie.co.at/publ/abst/17-4-89.html ''International Lighting Vocabulary'']. Number 17.4. CIE, 4th edition. ISBN 978-3-900734-07-7.</ref><ref name=Poynton>[[#Poynton|Poynton]]</ref><ref>{{cite book |title=Digital Color Imaging Handbook |last=Sharma |first=G.|year=2003 |publisher=CRC Press |location=Boca Raton, FL |isbn=0-8493-0900-X }}</ref>
 
; [[Hue]]: The "attribute of a visual sensation according to which an area appears to be similar to one of the [[unique hues|perceived colors]]: red, yellow, green, and blue, or to a combination of two of them".
; Intensity, [[radiance]]: The total amount of light passing through a particular area.
; [[Luminance]] (''Y''): The radiance weighted by the effect of each wavelength on a typical human observer, measured in [[candela per square metre|candela per square meter]] (cd/m<sup>2</sup>). Often the term ''luminance'' is used for the [[Luminance (relative)|relative luminance]], ''Y''/''Y''<sub>''n''</sub>, where ''Y''<sub>''n''</sub> is the luminance of the reference [[white point]].
; [[Luma (video)|Luma]] (''Y′''): The weighted sum of [[gamma correction|gamma-corrected]] {{nobr|''R''′}}, {{nobr|''G''′}}, and {{nobr|''B''′}} values, and used in [[YCbCr|{{nobr|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 (color)|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 power distribution|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 [[lighting|illumination]]. ''Saturation'' can be defined as either the ratio of colorfulness to brightness or of chroma to lightness.
 
=== General approach ===
HSL, HSV, and related models can be derived via geometric strategies, or can be thought of as specific instances of a "generalized LHS model". The HSV and HSL model-builders took an RGB cube – with constituent amounts of red, green, and blue light in a color denoted {{nobr|1=''R'', ''G'', ''B'' [[∈]] [[Unit interval|[0, 1]]]}}<ref>In [[#Levkowitz|Levkowitz and Herman’s]] formulation, ''R'', ''G'', and ''B'' stand for the voltages on the guns of a CRT display, which might have different maxima, and so their cartesian [[gamut]] could be a box of any unequal dimensions. Other definitions commonly use integer values in the range {{nobr|[0, 255]}}, storing the value for each component in one [[byte]]. We define the RGB gamut to be a [[unit cube]] for convenience, because it simplifies and clarifies the math. Also, in general, HSL and HSV are today computed directly from [[gamma correction|gamma-corrected]] {{nobr|''R''′}}, {{nobr|''G''′}}, and {{nobr|''B''′}} – for instance in [[sRGB]] space – but, when the models were developed, might have been transformations of a linear RGB space. Early authors don’t address gamma correction at all. We will drop the primes, and the labels ''R'', ''G'', and ''B'' should be taken to stand for the three attributes of the origin RGB space, whether or not it is gamma corrected.</ref> – and tilted it on its corner, so that black rested at the origin with white directly above it along the vertical axis, then measured the hue of the colors in the cube by their angle around that axis, starting with red at 0°. Then they came up with a characterization of brightness/value/lightness, and defined saturation to range from 0 along the axis to 1 at the most colorful point for each pair of other parameters.<ref name=Levkowitz/><ref name=Smith/><ref name=Joblove/>
 
=== Hue and chroma ===
[[File:HSL-HSV hue and chroma.svg|thumb|right|300px|Fig. 9. Both hue and chroma are defined based on the projection of the RGB cube onto a hexagon in the "chromaticity plane". Chroma is the relative size of the hexagon passing through a point, and hue is how far around that hexagon’s edge the point lies.|alt=When an RGB cube, tilted so that its white corner rests vertically above its black corner, is projected into the plane perpendicular to that neutral axis, it makes the shape of a hexagon, with red, yellow, green, cyan, blue, and magenta arranged counterclockwise at its corners. This projection defines the hue and chroma of any color, as described in the caption and article text.]]
In each of our models, we calculate both ''hue'' and what this article will call [[colorfulness|''chroma'']], after Joblove and Greenberg, in the same way – that is, the hue of a color has the same numerical values in all of these models, as does its chroma. If we take our tilted RGB cube, and [[3D projection|project]] it onto the "chromaticity [[plane (geometry)|plane]]" [[perpendicular]] to the neutral axis, our projection takes the shape of a hexagon, with red, yellow, green, cyan, blue, and magenta at its corners ({{nobr|fig. 9}}). ''Hue'' is roughly the angle of the [[Euclidean vector|vector]] to a point in the projection, with red at 0°, while ''chroma'' is roughly the distance of the point from the origin.<ref>Using the ''chroma'' here not only agrees with the original [[#Joblove|Joblove and Greenberg]] paper, but is also in the proper spirit of the psychometric definition of the term. Some models call this attribute ''saturation'' – for instance [[Adobe Photoshop]]’s "Saturation" blend mode – but such use is even more confusing than the use of the term in HSL or HSV, especially when two substantially different definitions are used side by side.</ref><ref>Most of the computer graphics papers and books discussing HSL or HSV have a formula or algorithm describing them formally. Our formulas which follow are some mix of those. See, for instance, [[#Agoston|Agoston]] or [[#Foley|Foley]]</ref>
 
More precisely, both hue and chroma in this model are defined with respect to the hexagonal shape of the projection. The ''chroma'' is the proportion of the distance from the origin to the edge of the hexagon. In the lower part of the diagram to the right, this is the ratio of lengths {{nobr|''OP''/''OP''′}}, or alternately the ratio of the radii of the two hexagons. This ratio is the difference between the largest and smallest values among ''R'', ''G'', or ''B'' in a color. To make our definitions easier to write, we’ll define these maximum and minimum component values as ''M'' and ''m'', respectively.<ref>[[#Hanbury2002|Hanbury and Serra]] put a great deal of effort into explaining why what we call ''chroma'' here can be written as {{nobr|max(''R'', ''G'', ''B'') − min(''R'', ''G'', ''B''}}), and showing that this value is a [[seminorm]]. They reserve the name ''chroma'' for the [[Euclidean distance|Euclidean]] [[Euclidean norm|norm]] in the chromaticity plane (our ''C''<sub>2</sub>), and call this hexagonal distance ''saturation'' instead, as part of their IHLS model</ref>
 
:<math>\begin{align}
  M &= \operatorname{max}(R, G, B) \\
  m &= \operatorname{min}(R, G, B) \\
  C &= M - m
\end{align}</math>
 
To understand why chroma can be written as {{nobr|''M'' − ''m''}}, notice that any neutral color, with {{nobr|1=''R'' = ''G'' = ''B''}}, projects onto the origin and so has 0 chroma. Thus if we add or subtract the same amount from all three of ''R'', ''G'', and ''B'', we move vertically within our tilted cube, and do not change the projection. Therefore, the two colors {{nobr|(''R'', ''G'', ''B'')}} and {{nobr|(''R'' − ''m'', ''G'' − ''m'', ''B'' − ''m'')}} project on the same point, and have the same chroma. The chroma of a color with one of its components equal to zero {{nobr|1=(''m'' = 0)}} is simply the maximum of the other two components. This chroma is ''M'' in the particular case of a color with a zero component, and {{nobr|''M'' − ''m''}} in general.
 
The ''hue'' is the proportion of the distance around the edge of the hexagon which passes through the projected point, originally measured on the range {{nobr|[0, 1)}} but now typically measured in [[degree (angle)|degrees]] {{nobr|[0°, 360°)}}. For points which project onto the origin in the chromaticity plane (i.e., grays), hue is undefined. Mathematically, this definition of hue is written [[piecewise]]:<ref>In the following, the multiplication of hue by 60° – that is, 360°/6 – can be seen as the hexagonal-geometry analogue of the conversion from [[radian]]s to degrees, a multiplication by 360°/2''π'': the circumference of a [[unit circle]] is 2''π''; the circumference of a unit hexagon is 6.</ref>
 
:<math>\begin{align}
  H^\prime &=
    \begin{cases}
      \mathrm{undefined},        &\mbox{if } C = 0 \\
      \frac{G - B}{C} \;\bmod 6, &\mbox{if } M = R \\
      \frac{B - R}{C} + 2,      &\mbox{if } M = G \\
      \frac{R - G}{C} + 4,      &\mbox{if } M = B
    \end{cases} \\
  H        &= 60^\circ \times H^\prime
\end{align}</math>
 
Sometimes, neutral colors (i.e. with {{nobr|1=''C'' = 0}}) are assigned a hue of 0° for convenience of representation.
 
[[File:hsv-hexagons-to-circles.svg|thumb|right|400px|Fig. 10. The definitions of ''hue'' and ''chroma'' in HSL and HSV have the effect of warping hexagons into circles.|alt=Pictured at left is the hexagonal projection shown earlier. At right, each side of the hexagon has been changed into a 60° arc of a circle with the same radius.]]
These definitions amount to a geometric warping of hexagons into circles: each side of the hexagon is mapped linearly onto a 60° arc of the circle ({{nobr|fig. 10}}). After such a transformation, hue is precisely the angle around the origin and chroma the distance from the origin: the angle and magnitude of the [[Euclidean vector|vector]] pointing to a color.
 
[[File:hsv-polar-coord-hue-chroma.svg|thumb|right|300px|Fig. 11. Constructing rectangular chromaticity coordinates ''α'' and ''β'', and then transforming those into hue ''H''<sub>2</sub> and chroma ''C''<sub>2</sub> yields slightly different values than computing hexagonal hue ''H'' and chroma ''C'': compare the numbers in this diagram to those earlier in this section.|alt=Instead of measuring hue and chroma with reference to the hexagonal edge of the projection of the RGB cube into the plane perpendicular to its neutral axis, we can define chromaticity coordinates alpha and beta in the plane – with alpha pointing in the direction of red, and beta perpendicular to it – and then define hue ''H''<sub>2</sub> and chroma ''C''<sub>2</sub> as the polar coordinates of these. That is, the tangent of hue is beta over alpha, and chroma squared is alpha squared plus beta squared.]]
Sometimes for image analysis applications, this hexagon-to-circle transformation is skipped, and ''hue'' and ''chroma'' (we’ll denote these ''H''<sub>2</sub> and ''C''<sub>2</sub>) are defined by the usual cartesian-to-polar coordinate transformations ({{nobr|fig. 11}}). The easiest way to derive those is via a pair of cartesian chromaticity coordinates which we’ll call ''α'' and ''β'':<ref name=Hanbury2002>[[#Hanbury2002|Hanbury and Serra (2002)]]</ref><ref name=Hanbury2008>{{cite journal|author=Allan Hanbury |year= 2008|url=http://muscle.ercim.eu/images/DocumentPDF/Hanbury_PRL.pdf |doi=10.1016/j.patrec.2007.11.002|title=Constructing cylindrical coordinate colour spaces|journal=Pattern Recognition Letters|volume=29|issue=4|pages=494}}</ref><ref>{{cite journal|author=Patrick Lambert and Thierry Carron |doi=10.1016/S0031-3203(99)00010-2|title=Symbolic fusion of luminance-hue-chroma features for region segmentation|year=1999|journal=Pattern Recognition|volume=32|issue=11|pages=1857}}</ref>
 
:<math>\begin{align}
  \alpha &= \textstyle{\frac{1}{2}}(2R - G - B) \\
  \beta &= \textstyle{\frac{\sqrt{3}}{2}}(G - B) \\
  H_2    &= \operatorname{atan2}(\beta, \alpha) \\
  C_2    &= \sqrt{\alpha^2 + \beta^2}
\end{align}</math>
 
(The [[atan2]] function, a "two-argument arctangent", computes the angle from a cartesian coordinate pair.)
 
Notice that these two definitions of hue (''H'' and ''H''<sub>2</sub>) nearly coincide, with a maximum difference between them for any color of about 1.12° – which occurs at twelve particular hues, for instance {{nobr|1=''H'' = 13.38°}}, {{nobr|1=''H''<sub>2</sub> = 12.26°}} – and with {{nobr|1=''H'' = ''H''<sub>2</sub>}} for every multiple of 30°. The two definitions of chroma (''C'' and ''C''<sub>2</sub>) differ more substantially: they are equal at the corners of our hexagon, but at points halfway between two corners, such as {{nobr|1=''H'' = ''H''<sub>2</sub> = 30°}}, we have {{nobr|1=''C'' = 1}}, but {{nobr|1=''C''<sub>2</sub> = {{radic|¾}} ≈ 0.866}}, a difference of about 13.4%.
 
{{clear}}
 
==={{Anchor|Lightness|Value|Brightness|Intensity}} Lightness ===
[[File:hsl-hsv chroma-lightness slices.svg|thumb|right|400px|Fig. 12a–d. Four different possible "lightness" dimensions, plotted against chroma, for a pair of complementary hues. Each plot is a vertical cross-section of its three-dimensional color solid.|alt=When we plot HSV value against chroma, the result, regardless of hue, is an upside-down isosceles triangle, with black at the bottom, and white at the top bracketed by the most chromatic colors of two complementary hues at the top right and left corners. When we plot HSL lightness against chroma, the result is a rhombus, again with black at the bottom and white at the top, but with the colorful complements at horizontal ends of the line halfway between them. When we plot the component average, sometimes called HSI intensity, against chroma, the result is a parallelogram whose shape changes depending on hue, as the most chromatic colors for each hue vary between one third and two thirds between black and white. Plotting luma against chroma yields a parallelogram of much more diverse shape: blue lies about 10 percent of the way from black to white, while its complement yellow lies 90 percent of the way there; by contrast, green is about 60 percent of the way from black to white while its complement magenta is 40 percent of the way there.]]
 
While the definition of ''hue'' is relatively uncontroversial – it roughly satisfies the criterion that colors of the same perceived hue should have the same numerical hue – the definition of a ''lightness'' or ''value'' dimension is less obvious: there are several possibilities depending on the purpose and goals of the representation. Here are four of the most common ({{nobr|fig. 12}}; three of these are also shown in [[#Color-making attributes|{{nobr|fig. 8}}]]):
 
* The simplest definition is just the [[arithmetic mean|average]] of the three components, in the HSI model called ''intensity'' ({{nobr|fig. 12a}}). This is simply the projection of a point onto the neutral axis – the vertical height of a point in our tilted cube. The advantage is that, together with Euclidean-distance calculations of hue and chroma, this representation preserves distances and angles from the geometry of the RGB cube.<ref name=Hanbury2008/><ref>Rafael C. Gonzalez and Richard Eugene Woods (2008). ''Digital Image Processing'', 3rd ed. Upper Saddle River, NJ: Prentice Hall. ISBN 0-13-168728-X. [http://books.google.com/books?id=8uGOnjRGEzoC&pg=PA410&lpg=PA410 {{nobr|pp. 407–413}}].</ref>
*:<math>I = \textstyle{\frac{1}{3}}(R + G + B)\,\!</math>
 
* In the HSV "hexcone" model, ''value'' is defined as the largest component of a color, our ''M'' above ({{nobr|fig. 12b}}). This places all three primaries, and also all of the "secondary colors" – cyan, yellow, and magenta – into a plane with white, forming a [[hexagonal pyramid]] out of the RGB cube.<ref name=Smith/>
*:<math>V = M\,\!</math>
 
* In the HSL "bi-hexcone" model, ''lightness'' is defined as the average of the largest and smallest color components ({{nobr|fig. 12c}}). This definition also puts the primary and secondary colors into a plane, but a plane passing halfway between white and black. The resulting color solid is a double-cone similar to Ostwald’s, [[#Motivation|shown above]].<ref name=Joblove/>
*:<math>L = \textstyle{\frac{1}{2}}(M + m)\,\!</math>
 
* A more perceptually relevant alternative is to use [[luma (video)|''luma'']], {{nobr|''Y''′}}, as a lightness dimension ({{nobr|fig. 12d}}). Luma is the weighted average of gamma-corrected ''R'', ''G'', and ''B'', based on their contribution to perceived luminance, long used as the monochromatic dimension in color television broadcast. For the [[Rec. 709]] primaries used in [[sRGB]], {{nobr|1=''Y''′<sub>709</sub> = 0.21''R'' + 0.72''G'' + 0.07''B''}}; for the [[Rec. 601]] [[NTSC]] primaries, {{nobr|1=''Y''′<sub>601</sub> = 0.30''R'' + 0.59''G'' + 0.11''B''}}; for other primaries different coefficients should be used.<ref name=Poynton/><ref>For a more specific discussion of the term ''luma'', see Charles Poynton (1999). [http://poynton.com/papers/YUV_and_luminance_harmful.html "''YUV'' and ''luminance'' considered harmful: A plea for precise terminology in video"]. ''www.poynton.com''. Accessed January 2010.</ref><ref>See also [[RGB color space#Specifications]]. Photoshop exclusively uses the NTSC coefficients for its "Luminosity" blend mode regardless of the RGB color space involved. See:<br>Bruce Lindbloom (2001-09-25). [http://lists.apple.com/archives/colorsync-users/2001/Sep/msg00488.html "Re: Luminosity channel..."]. ''colorsync-users mailing list''.</ref>
*:<math>Y^\prime_{601} = 0.30R + 0.59G + 0.11B\,\!</math><!-- The \,\! is to keep the formula rendered as PNG instead of HTML. See Help:Math discussion on rendering of ^\prime vs \prime in PNG and HTML. Note that \, or \; do not disable HTML output by themselves for all browsers/MathML settings. -->
 
All four of these leave the neutral axis alone. That is, for colors with {{nobr|1=''R'' = ''G'' = ''B''}}, any of the four formulations yields a lightness equal to the value of ''R'', ''G'', or ''B''.
 
For a graphical comparison, see [[#Disadvantages|fig. 13 below]].
 
{{clear}}
 
=== Saturation ===
[[File:hsl-hsv saturation-lightness slices.svg|thumb|right|400px|Fig. 14a–d. In both HSL and HSV, ''saturation'' is simply the chroma scaled to fill the interval {{nobr|[0, 1]}} for every combination of hue and lightness or value.]]
If we encode colors in a hue/lightness/chroma or hue/value/chroma model (using the definitions from the previous two sections), not all combinations of lightness (or value) and chroma are meaningful: that is, half of the colors we can describe using {{nobr|''H'' ∈ [0°, 360°)}}, {{nobr|''C'' ∈ [0, 1]}}, and {{nobr|''V'' ∈ [0, 1]}} fall outside the RGB gamut (the gray parts of the slices in figure 14). The creators of these models considered this a problem for some uses. For example, in a color selection interface with two of the dimensions in a rectangle and the third on a slider, half of that rectangle is made of unused space. Now imagine we have a slider for lightness: the user’s intent when adjusting this slider is potentially ambiguous: how should the software deal with out-of-gamut colors? Or conversely, If the user has selected as colorful as possible a dark purple {{nobr|{{colorsample2|#42007F}},}} and then shifts the lightness slider upward, what should be done: would the user prefer to see a lighter purple still as colorful as possible for the given hue and lightness {{nobr|{{colorsample2|#7700E5}},}} or a lighter purple of exactly the same chroma as the original color {{nobr|{{colorsample2|#7533B2}}?}}<ref name=Joblove/>
 
To solve problems such as these, the HSL and HSV models scale the chroma so that it always fits into the range {{nobr|[0, 1]}} for every combination of hue and lightness or value, calling the new attribute ''saturation'' in both cases (fig. 14). To calculate either, simply divide the chroma by the maximum chroma for that value or lightness.
 
:<math>\begin{align}
  S_{HSV} &=
    \begin{cases}
      0,          &\mbox{if } C = 0 \\
      \frac{C}{V}, &\mbox{otherwise}
    \end{cases} \\
  S_{HSL} &=
    \begin{cases}
      0,              &\mbox{if } C = 0 \\
      \frac{C}{1 - |2L - 1|},  &\mbox{otherwise}
    \end{cases}
\end{align}</math>
 
[[File:hsi saturation-intensity slices.svg|thumb|right|400px|Fig. 15a–b. In HSI, ''saturation'', shown in the slice on the right, is roughly the chroma relative to lightness. Also common is a model with dimensions ''I'', ''H''<sub>2</sub>, ''C''<sub>2</sub>, shown in the slice on the left. Notice that the hue in these slices is the same as the hue above, but ''H'' differs slightly from ''H''<sub>2</sub>]]
The HSI model commonly used for computer vision, which takes ''H''<sub>2</sub> as a hue dimension and the component average ''I'' ("intensity") as a lightness dimension, does not attempt to "fill" a cylinder by its definition of saturation. Instead of presenting color choice or modification interfaces to end users, the goal of HSI is to facilitate separation of shapes in an image. Saturation is therefore defined in line with the psychometric definition: chroma relative to lightness ({{nobr|fig. 15}}). See the [[#Use in image analysis|Use in image analysis]] section of this article.<ref name=Cheng/>
 
:<math>
S_{HSI} =
  \begin{cases}
    0,               &\mbox{if } C=0 \\
    1 - \frac{m}{I}, &\mbox{otherwise}
   \end{cases}
</math>
 
Using the same name for these three different definitions of saturation leads to some confusion, as the three attributes describe substantially different color relationships; in HSV and HSI, the term roughly matches the psychometric definition, of a chroma of a color relative to its own lightness, but in HSL it does not come close. Even worse, the word ''saturation'' is also often used for one of the measurements we call chroma above (''C'' or ''C''<sub>2</sub>).
{{clear}}
 
=== Examples ===
All parameter values shown below are in the interval {{nobr|[0, 1]}}, except those for ''H'' and ''H''<sub>2</sub> which are in the interval {{nobr|[0°, 360°)}}.<ref>The first nine colors in this table were chosen by hand, and the last ten colors were chosen at random.</ref>
 
{{Hsl-hsv-examples}}
 
== Use in end-user software ==
[[File:hsl-hsv-colorpickers.svg|thumb|right|300px|Fig 16a–g. By the 1990s, HSL and HSV color selection tools were ubiquitous. The screenshots above are taken from: (a) SGI [[IRIX]] 5, ca. 1995; (b) Adobe [[Adobe Photoshop|Photoshop]], ca. 1990; (c) IBM [[OS/2#The "Warp" years|OS/2 Warp]] 3, ca. 1994; (d) Apple Macintosh [[System 7]], ca. 1996; (e) Fractal Design [[Corel Painter|Painter]], ca. 1993; (f) Microsoft [[Windows 3.1x|Windows 3.1]], ca. 1992; (g) [[NeXTSTEP]], ca. 1995. These are undoubtedly based on earlier examples, stretching back to PARC and NYIT in the mid-1970s.<ref>See [[#Smith|Smith]]. Many of these screenshots were taken from the [http://www.guidebookgallery.org/ GUIdebook], and the rest were gathered from image search results.</ref>]]
{{see also|Color tool|Image editing}}
The original purpose of HSL and HSV and similar models, and their most common current application, is in [[color tool|color selection tools]]. At their simplest, some such color pickers provide three sliders, one for each attribute. Most, however, show a two-dimensional slice through the model, along with a slider controlling which particular slice is shown. The latter type of GUI exhibits great variety, because of the choice of cylinders, hexagonal prisms, or cones/bicones that the models suggest (see the diagram near the [[#top|top of the page]]). Several color choosers from the 1990s are shown to the right, most of which have remained nearly unchanged in the intervening time: today, nearly every computer color chooser uses HSL or HSV, at least as an option. Some more sophisticated variants are designed for choosing whole sets of colors, basing their suggestions of compatible colors on the HSL or HSV relationships between them.<ref>For instance, a tool in [[Adobe Illustrator|Illustrator]] CS4, and Adobe’s related web tool, [[Adobe Kuler|Kuler]], both allow users to define color schemes based on HSV relationships, but with a hue circle modified to better match the [[RYB color model|RYB model]] used traditionally by painters. The web tools [http://www.colorjack.com/sphere/ ColorJack], [http://www.colorsontheweb.com/colorwizard.asp Color Wizard], and [http://www.colorblender.com/ ColorBlender] all pick color schemes with reference to HSL or HSV.</ref>
 
Most web applications needing color selection also base their tools on HSL or HSV, and pre-packaged open source color choosers exist for most major web front-end [[JavaScript library|frameworks]]. The [[Cascading Style Sheets|CSS 3]] specification allows web authors to specify colors for their pages directly with HSL coordinates.<ref>Try a web search for "«framework name» color picker" for examples for a given framework, or "[[JavaScript]] color picker" for general results.<br>Tantek Çelik, Chris Lilley, and L. David Baron (July 2008). [http://www.w3.org/TR/2008/WD-css3-color-20080721/#hsl-color "CSS3 Color Module"]. W3C Working Draft 21 July 2008.</ref>
 
HSL and HSV are sometimes used to define gradients for [[data visualization]], as in maps or medical images. For example, the popular [[Geographic information system|GIS]] program [[ArcGIS]] historically applied customizable HSV-based gradients to numerical geographical data.<!-- Several studies have been done on color scheme choices for such data display, and the use of HSL- and HSV-based schemes has  --><ref>ArcGIS calls its map-symbol gradients "color ramps". Current versions of ArcGIS can use CIELAB instead for defining them.<br>[[ESRI]] (January 2008). [http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Working_with_color_ramps "Working with color ramps"]. ''ArcGIS 9.2 Help''. Accessed February 2010.</ref>
 
{{clear-right}}
{| class="wikitable" style="float:right; margin:0.5em 0 0.8em 1.4em;"
| rowspan="2" border="0" | [[File:Xv hsv-modification.png|none|89px]]<div style="width:79px; font-size: smaller;" class="thumbcaption">Fig. 17. [[xv]]’s HSV-based color modifier.</div>
| border="0" | [[File:PS 2.5 hue-saturation tool.png|none|210px]]<div style="width:200px; font-size: smaller;" class="thumbcaption">Fig. 18. The hue/saturation tool in [[Adobe Photoshop|Photoshop]] 2.5, ca. 1992</div>
|-
| border="0" |<!-- Deleted image removed[[File:Avid-hsl.png|none|210px]] --><div style="width:200px; font-size: smaller;" class="thumbcaption">Fig. 19. [[Avid Technology|Avid]]’s video color adjustment tool, based on HSL or a similar model.</div>
|}
[[Image editing]] software also commonly includes tools for adjusting colors with reference to HSL or HSV coordinates, or to coordinates in a model based on the "intensity" or luma [[#Lightness|defined above]]. In particular, tools with a pair of "hue" and "saturation" sliders are commonplace, dating to at least the late-1980s, but various more complicated color tools have also been implemented. For instance, the [[Unix]] image viewer and color editor [[xv]] allowed six user-definable hue (''H'') ranges to be rotated and resized, included a [[dial (measurement)|dial]]-like control for saturation (''S''<sub>''HSV''</sub>), and a [[curve (tonality)|curves]]-like interface for controlling value (''V'') – see fig. 17. The image editor [[Picture Window|Picture Window Pro]] includes a "color correction" tool which affords complex remapping of points in a hue/saturation plane relative to either HSL or HSV space.<ref>For instance, the first version of Photoshop had an HSL-based tool; see [http://www.guidebookgallery.org/apps/photoshop/huesaturation "Photoshop hue/saturation"] in the GUIdebook for screenshots.<br>John Bradley (1994). ''XV 3.10a Manual''. [http://www.trilon.com/xv/manual/xv-3.10a/color-editor-2.html "The HSV Modification Tools"]<br>Kiril Sinkel (January 2010). [http://www.dl-c.com/Temp/downloads/PW%20Doc/PW70.pdf ''User Guide for Picture Window and Picture Window Pro'']. Digital Light & Color.</ref>
 
[[Non-linear editing system|Video editors]] also use these models. For example, both [[Avid Technology|Avid]] and [[Final Cut Pro]] include color tools based on HSL or a similar geometry for use adjusting the color in video. With the Avid tool, users pick a vector by clicking a point within the hue/saturation circle to shift all the colors at some lightness level (shadows, mid-tones, highlights) by that vector.
 
Since version 4.0, Adobe Photoshop’s "Luminosity", "Hue", "Saturation", and "Color" [[blend modes]] composite layers using a luma/chroma/hue color geometry. These have been copied widely, but several imitators use the HSL (e.g. [[Ulead PhotoImpact|PhotoImpact]], [[Corel Paint Shop Pro|Paint Shop Pro]]) or HSV (e.g. [[GIMP]]) geometries instead.<ref>Photoshop’s documentation explains that, e.g., "Luminosity: Creates a result color with the hue and saturation of the base color and the luminance of the blend color."<br>[http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WSfd1234e1c4b69f30ea53e41001031ab64-77e9.html "List of Blending Modes"]. ''Adobe Help Resource Center''.<!-- could use a ref about photoimpact, PSP, GIMP--></ref>
{{clear-left}}
 
== Use in image analysis ==
{{see also|Computer vision|Image analysis}}
HSL, HSV, HSI, or related models are often used in [[computer vision]] and [[image analysis]] for [[feature detection (computer vision)|feature detection]] or [[segmentation (image processing)|image segmentation]]. The applications of such tools include object detection, for instance in [[machine vision|robot vision]]; [[object recognition]], for instance of [[facial recognition system|faces]], [[optical character recognition|text]], or [[automatic number plate recognition|license plates]]; [[content-based image retrieval]]; and [[medical imaging|analysis of medical images]].<ref name=Cheng/>
 
For the most part, computer vision algorithms used on color images are straightforward extensions to algorithms designed for [[grayscale]] images, for instance [[k-means clustering|k-means]] or [[fuzzy clustering|fuzzy]] [[cluster analysis|clustering]] of pixel colors, or [[canny edge detector|canny]] [[edge detection]]. At the simplest, each color component is separately passed through the same algorithm. It is important, therefore, that the [[feature (computer vision)|features]] of interest can be distinguished in the color dimensions used. Because the ''R'', ''G'', and ''B'' components of an object’s color in a digital image are all correlated with the amount of light hitting the object, and therefore with each other, image descriptions in terms of those components make object discrimination difficult. Descriptions in terms of hue/lightness/chroma or hue/lightness/saturation are often more relevant.<ref name=Cheng/>
 
Starting in the late 1970s, transformations like HSV or HSI were used as a compromise between effectiveness for segmentation and computational complexity. They can be thought of as similar in approach and intent to the neural processing used by human color vision, without agreeing in particulars: if the goal is object detection, roughly separating hue, lightness, and chroma or saturation is effective, but there is no particular reason to strictly mimic human color response. John Kender’s 1976 master’s thesis proposed the HSI model. Ohta et al. (1980) instead used a model made up of dimensions similar to those we have called ''I'', ''α'', and ''β''. In recent years, such models have continued to see wide use, as their performance compares favorably with more complex models, and their computational simplicity remains compelling.<ref>The Ohta et al. model has parameters {{nobr|1=''I''<sub>1</sub> = (''R'' + ''G'' + ''B'')/3}}, {{nobr|1=''I''<sub>2</sub> = (''R'' − ''B'')/2}}, {{nobr|1=''I''<sub>3</sub> = (2''G'' − ''R'' − ''B'')/4}}. ''I''<sub>1</sub> is the same as our ''I'', and ''I''<sub>2</sub> and ''I''<sub>3</sub> are similar to our ''β'' and ''α'', respectively, except that (a) where ''α'' points in the direction of ''R'' in the "chromaticity plane", ''I''<sub>3</sub> points in the direction of ''G'', and (b) the parameters have a different linear scaling which avoids the {{radic|3}} of our ''β''.</ref><ref>John Kender (1976). "Saturation, hue and normalized color". Carnegie Mellon University, Computer Science Dept. Pittsburgh, PA.</ref><ref>{{cite journal|author=Yu-Ichi Ohta, Takeo Kanade, and Toshiyuki Sakai |doi=10.1016/0146-664X(80)90047-7|title=Color information for region segmentation|year=1980|journal=Computer Graphics and Image Processing|volume=13|issue=3|pages=222}}</ref><ref name=Cheng/><ref>{{cite journal|author=Ffrank Perez and Christof Koch |doi=10.1007/BF01420983|title=Toward color image segmentation in analog VLSI: Algorithm and hardware|year=1994|journal=International Journal of Computer Vision|volume=12|pages=17}}</ref>
<!--
Demarty, C.-H., Beucher, S., 1998. Color segmentation algorithm using an HLS transformation. In: Proceedings of the International Symposium on Mathematical Morphology (ISMM ’98). {{nobr|pp. 231–238}}.
 
-->
 
== Disadvantages ==
{{double image|right|srgb-in-cielab.png|197|adobergb-in-cielab.png|197|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.|b. 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.}}
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.<ref>Most of the disadvantages below are listed in [[#Poynton|Poynton]], though as mere statements, without examples.</ref>
 
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}}). CIELAB ''L''* is a CIE-defined quantity intended to match perceptual lightness response, and it is plain that ''L''* appears similar in lightness to the original color image. Luma is roughly similar, but differs somewhat at high chroma. HSL ''L'' and HSV ''V'', by contrast, diverge substantially from perceptual lightness.
 
{{clear}}
{{triple image|center|Fire breathing 2 Luc Viatour.jpg|220|Fire-breather CIELAB L*.jpg|220|Fire-breather 601 Luma Y'.jpg|220|Fig. 13a. Color photograph|b. CIELAB ''L''*|c. Rec. 601 luma {{nobr|''Y''′}}|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.|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.|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.}}
{{triple image|center|Fire-breather mean(R,G,B) I.jpg|220|Fire-breather HSV V.jpg|220|Fire-breather HSL L.jpg|220|d. Component average: "intensity" ''I''|e. HSV value ''V''|f. HSL lightness ''L''|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.|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.|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.}}
 
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]]:
 
{{cquote|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>The text of Brewer’s presentation to the ASA is online, [http://www.personal.psu.edu/cab38/ColorSch/ASApaper.html "Color Use Guidelines for Data Representation"]. The published paper is Cynthia A. Brewer (1999). "Color Use Guidelines for Data Representation", ''Proceedings of the Section on Statistical Graphics''. Alexandria, VA: American Statistical Association. {{nobr|pp. 55–60}}.</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 on the left (a) is the original photograph of a [[green turtle]]. In the middle 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 on the 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.
 
{{clear}}
{{triple image|center|Hawaii turtle 2.JPG|220|Hawaii-turtle hue shifted.jpg|220|Hawaii-turtle hue shifted with constant L*.jpg|220|Fig. 21a. Color photograph|b. HSL/HSV hue of each color shifted by {{nowrap|−30°}}|c. Hue shifted but CIELAB lightness (''L''*) kept as in the original}}
 
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]]. 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 | id = {{citeseerx|10.1.1.4.1381}} | title = Circular Statistics Applied to Colour Images | conference = 8th Computer Vision Winter Workshop}}</ref><ref>Circular statistics are described in the textbook {{cite book | first = Nicholas | last = Fisher | year = 1996 | url = http://www.cup.es/us/catalogue/catalogue.asp?isbn=9780521568906 | title = Statistical Analysis of Circular Data | location = Cambridge, England | publisher = Cambridge University Press }}</ref>
 
Charles Poynton, digital video expert, lists the above problems with HSL and HSV in his ''Color FAQ'', and concludes that:
 
{{cquote|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>Charles Poynton (1997). [http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC36 "What are HSB and HLS?"] poynton.com</ref>}}
 
== Other cylindrical-coordinate color models ==
{{multiple image
| align    = right
| image1    = Runge Farbenkugel.jpg
| width1    = 197
| alt1      =
| caption1  = Fig. 22. Runge’s ''Farbenkugel'', 1810.
| image2    = Munsell color sphere.png
| width2    = 197
| alt2      =
| caption2  = Fig. 23. Munsell’s balanced color sphere, 1900, from ''A Color Notation'', 1905.
}}
{{see also|Color solid}}
The creators of HSL and HSV were far from the first to imagine colors fitting into conic or spherical shapes, with neutrals running from black to white in a central axis, and hues corresponding to angles around that axis. Similar arrangements date back to the 18th century, and continue to be developed in the most modern and scientific models. A pair of the most influential older models are [[Philipp Otto Runge]]’s 1810 ''Farbenkugel'' (color sphere), and the early-20th-century [[Munsell color system]]. [[Albert Henry Munsell|Albert Munsell]] began with a spherical arrangement in his 1905 book ''A Color Notation'', but he wished to properly separate color-making attributes into separate dimensions, which he called ''hue'', ''value'', and ''chroma'', and after taking careful measurements of perceptual responses, he realized that no symmetrical shape would do, so he reorganized his system into a lumpy blob.<ref>[[Philipp Otto Runge]] (1810). ''Die Farben-Kugel, oder Construction des Verhaeltnisses aller Farben zueinander''. Hamburg, Germany: Perthes.<br>[[Albert Henry Munsell]] (1905). ''A Color Notation''. Boston, MA: [[Munsell Color Company]].<br>See also [[#Fairchild|Fairchild]], and [[Munsell Color System]] and its references.</ref>
 
Munsell’s system became extremely popular, the de facto reference for American color standards – used not only for specifying the color of paints and crayons, but also, e.g., electrical wire, beer, and soil color – because it was organized based on perceptual measurements, specified colors via an easily learned and systematic triple of numbers, because the color chips sold in the ''Munsell Book of Color'' covered a wide [[gamut]] and remained stable over time (rather than fading), and because it was effectively marketed by [[Munsell Color Company|Munsell’s Company]]. In the 1940s, the [[Optical Society of America]] made extensive measurements, and adjusted the arrangement of Munsell colors, issuing a set of "renotations". The trouble with the Munsell system for computer graphics applications is that its colors are not specified via any set of simple equations, but only via its foundational measurements: effectively a [[lookup table]]. Converting from {{nobr|RGB ↔ Munsell}} requires interpolating between that table’s entries, and is extremely computationally expensive in comparison with converting from {{nobr|RGB ↔ HSL}} or {{nobr|RGB ↔ HSV}} which only requires a few simple arithmetic operations.<ref name=Fairchild>[[#Fairchild|Fairchild]]</ref><ref>Edward Landa and Mark Fairchild (September–October 2005). [http://www.americanscientist.org/issues/feature/charting-color-from-the-eye-of-the-beholder/5 "Charting Color from the Eye of the Beholder"]. ''American Scientist'' '''93'''(5): 436</ref><ref>{{cite journal|author=Dorothy Nickerson |year=1976|title=History of the Munsell Color System|journal=Color Research and Application|volume=1|pages=121–130}}</ref><ref>{{cite journal|author=Sidney Newhall, Dorothy Nickerson, and Deane Judd |doi=10.1364/JOSA.33.000385|title=Final Report of the OSA Subcommittee on the Spacing of the Munsell Colors|year=1943|journal=Journal of the Optical Society of America|volume=33|issue=7|pages=385}}</ref>
 
In [[densitometry]], a model quite similar to the hue defined above is used for describing colors of [[CMYK color model|CMYK process]] inks. In 1953, Frank Preucil developed two geometric arrangements of hue, the "Preucil hue circle" and the "Preucil hue hexagon", analogous to our ''H'' and ''H''<sub>2</sub>, respectively, but defined relative to idealized cyan, yellow, and magenta ink colors. The [[Preucil hue error|Preucil ''hue error'']] of an ink indicates the difference in the "hue circle" between its color and the hue of the corresponding idealized ink color. The ''grayness'' of an ink is {{nobr|''m''/''M''}}, where ''m'' and ''M'' are the minimum and maximum among the amounts of idealized cyan, magenta, and yellow in a density measurement.<ref>Frank Preucil (1953). "Color Hue and Ink Transfer – Their Relation to Perfect Reproduction". ''Proceedings of the 5th Annual Technical Meeting of TAGA''. {{nobr|pp. 102–110}}.<br>See also [[Hue]].</ref>
 
The Swedish [[Natural Color System]] (NCS), widely used in Europe, takes a similar approach to the Ostwald bicone [[#Motivation|shown earlier]]. Because it attempts to fit color into a familiarly shaped solid based on "[[phenomenology (psychology)|phenomenological]]" instead of photometric or psychological characteristics, it suffers from some of the same disadvantages as HSL and HSV: in particular, its lightness dimension differs from perceived lightness, because it forces colorful yellow, red, green, and blue into a plane.<ref name=MacEvoy>[[#MacEvoy|MacEvoy]]</ref>
 
The [[International Commission on Illumination]] (CIE) developed the [[CIE 1931 color space|XYZ model]] for describing the colors of light spectra in 1931, but its goal was to match human visual [[metamerism (color)|metamerism]], rather than to be perceptually uniform, geometrically. In the 1960s and 70s, attempts were made to transform XYZ colors into a more relevant geometry, influenced by the Munsell system. These efforts culminated in the 1976 [[CIELUV]] and [[CIELAB]] models. The dimensions of these models – {{nobr|(''L''*, ''u''*, ''v''*)}} and {{nobr|(''L''*, ''a''*, ''b''*)}}, respectively – are cartesian, based on the [[opponent process]] theory of color, but both are also often described using polar coordinates – {{nobr|(''L''*, ''C''*<sub>''uv''</sub>, ''h''*<sub>''uv''</sub>)}} or {{nobr|(''L''*, ''C''*<sub>''ab''</sub>, ''h''*<sub>''ab''</sub>)}}, where ''L''* is lightness, ''C''* is chroma, and ''h''* is hue angle. Officially, both CIELAB and CIELUV were created for their [[color difference]] metrics ∆''E''*<sub>''ab''</sub> and ∆''E''*<sub>''uv''</sub>, particularly for use defining color tolerances, but both have become widely used as color order systems and color appearance models, including in computer graphics and computer vision. For example, [[gamut mapping]] in [[International Color Consortium|ICC]] [[color management]] is usually performed in CIELAB space, and Adobe Photoshop includes a CIELAB mode for editing images. CIELAB and CIELUV geometries are much more perceptually relevant than many others such as RGB, HSL, HSV, YUV/YIQ/YCbCr or XYZ, but are not perceptually perfect, and in particular have trouble adapting to unusual lighting conditions.<ref name=Fairchild/><ref name=Kuehni>[[#Kuehni|Kuehni]]</ref><ref>Robert Hunt (2004). ''The Reproduction of Colour''. 6th ed. MN: Voyageur Press. ISBN 0-86343-368-5.</ref><ref>MacEvoy 2010. [http://www.handprint.com/HP/WCL/color7.html#CIELUV "Modern Color Models"]<br>Adobe (January 2007). [http://web.archive.org/web/20081207061220/http://kb.adobe.com/selfservice/viewContent.do?externalId=310838 "The Lab Color Mode in Photoshop"]. Technical Note 310838.<br>Steven K. Shevell (2003) ''The Science of Color''. 2nd ed. Elsevier Science & Technology. ISBN 0-444-51251-9. [http://books.google.com/books?id=G1TC1uXb7awC&pg=PA201 {{nobr|pp. 202–206}}]<br>See also [[CIELAB]], [[CIELUV]], [[Color difference]], [[Color management]], and their references.</ref>
 
The CIE’s most recent model, [[CIECAM02]] (CAM stands for "color appearance model"), is more theoretically sophisticated and computationally complex than earlier models. Its aims are to fix several of the problems with models such as CIELAB and CIELUV, and to explain not only responses in carefully controlled experimental environments, but also to model the color appearance of real-world scenes. Its dimensions ''J'' (lightness), ''C'' (chroma), and ''h'' (hue) define a polar-coordinate geometry.<ref name=Fairchild/><ref name=MacEvoy/>
<!-- TODO: add some pictures after the top pair? -->
 
== Converting to RGB ==
To convert from HSL or HSV to RGB, we essentially invert the steps listed [[#General approach|above]] (as before, {{nobr|1=''R'', ''G'', ''B'' [[∈]] [[Unit interval|[0, 1]]]}}). First, we compute chroma, by multiplying saturation by the maximum chroma for a given lightness or value. Next, we find the point on one of the bottom three faces of the RGB cube which has the same hue and chroma as our color (and therefore projects onto the same point in the chromaticity plane). Finally, we add equal amounts of ''R'', ''G'', and ''B'' to reach the proper lightness or value.
 
=== From HSV ===
[[File:HSV-RGB-comparison.svg|thumb|300px|right|Fig. 24. A graphical representation of RGB coordinates given values for HSV.]]
Given a color with hue {{nobr|''H'' ∈ [0°, 360°]}}, saturation {{nobr|''S''<sub>''HSV''</sub> ∈ [0, 1]}}, and value {{nobr|''V'' ∈ [0, 1]}}, we first find chroma:
 
:<math>C = V \times S_{HSV}\,\!</math>
 
Then we can find a point {{nobr|(''R''<sub>1</sub>, ''G''<sub>1</sub>, ''B''<sub>1</sub>)}} along the bottom three faces of the RGB cube, with the same hue and chroma as our color (using the intermediate value ''X'' for the second largest component of this color):
 
:<math>\begin{align}
  H^\prime &= \frac{H}{60^\circ} \\
  X        &= C (1 - |H^\prime \;\bmod 2 - 1|)
\end{align}</math>
:<math>
  (R_1, G_1, B_1) =
    \begin{cases}
      (0, 0, 0) &\mbox{if } H \mbox{ is undefined} \\
      (C, X, 0) &\mbox{if } 0 \leq H^\prime < 1 \\
      (X, C, 0) &\mbox{if } 1 \leq H^\prime < 2 \\
      (0, C, X) &\mbox{if } 2 \leq H^\prime < 3 \\
      (0, X, C) &\mbox{if } 3 \leq H^\prime < 4 \\
      (X, 0, C) &\mbox{if } 4 \leq H^\prime < 5 \\
      (C, 0, X) &\mbox{if } 5 \leq H^\prime < 6
    \end{cases}
</math>
 
Finally, we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match value:
 
:<math>\begin{align}
  &m = V - C \\
  &(R, G, B) = (R_1 + m, G_1 + m, B_1 + m)
\end{align}</math>
 
=== From HSL ===
Given an HSL color with hue {{nobr|''H'' ∈ [0°, 360°)}}, saturation {{nobr|''S''<sub>''HSL''</sub> ∈ [0, 1]}}, and lightness {{nobr|''L'' ∈ [0, 1]}}, we can use the same strategy. First, we find chroma:
:<math>
C =
\begin{align}
  (1 - \left\vert 2 L - 1 \right\vert) \times S_{HSL}
\end{align}
</math>
 
Then we can, again, find a point {{nobr|(''R''<sub>1</sub>, ''G''<sub>1</sub>, ''B''<sub>1</sub>)}} along the bottom three faces of the RGB cube, with the same hue and chroma as our color (using the intermediate value ''X'' for the second largest component of this color):
 
:<math>\begin{align}
  H^\prime &= \frac{H}{60^\circ} \\
  X        &= C (1 - |H^\prime \;\bmod 2 - 1|)
\end{align}</math>
:<math>
  (R_1, G_1, B_1) =
    \begin{cases}
      (0, 0, 0) &\mbox{if } H \mbox{ is undefined} \\
      (C, X, 0) &\mbox{if } 0 \leq H^\prime < 1 \\
      (X, C, 0) &\mbox{if } 1 \leq H^\prime < 2 \\
      (0, C, X) &\mbox{if } 2 \leq H^\prime < 3 \\
      (0, X, C) &\mbox{if } 3 \leq H^\prime < 4 \\
      (X, 0, C) &\mbox{if } 4 \leq H^\prime < 5 \\
      (C, 0, X) &\mbox{if } 5 \leq H^\prime < 6
    \end{cases}
</math>
 
Finally, we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match lightness:
 
:<math>\begin{align}
  &m = L - \textstyle{\frac{1}{2}}C \\
  &(R, G, B) = (R_1 + m, G_1 + m, B_1 + m)
\end{align}</math>
 
=== From luma/chroma/hue ===
Given a color with hue {{nobr|''H'' ∈ [0°, 360°)}}, chroma {{nobr|''C'' ∈ [0, 1]}}, and luma {{nobr|''Y''′<sub>601</sub> ∈ [0, 1]}},<ref>Some points in this cylinder fall out of [[gamut]].</ref> we can again use the same strategy. Since we already have ''H'' and ''C'', we can straightaway find our point {{nobr|(''R''<sub>1</sub>, ''G''<sub>1</sub>, ''B''<sub>1</sub>)}} along the bottom three faces of the RGB cube:
 
:<math>\begin{align}
  H^\prime &= \frac{H}{60^\circ} \\
  X        &= C (1 - |H^\prime \;\bmod 2 - 1|)
\end{align}</math>
:<math>
  (R_1, G_1, B_1) =
    \begin{cases}
      (0, 0, 0) &\mbox{if } H \mbox{ is undefined} \\
      (C, X, 0) &\mbox{if } 0 \leq H^\prime < 1 \\
      (X, C, 0) &\mbox{if } 1 \leq H^\prime < 2 \\
      (0, C, X) &\mbox{if } 2 \leq H^\prime < 3 \\
      (0, X, C) &\mbox{if } 3 \leq H^\prime < 4 \\
      (X, 0, C) &\mbox{if } 4 \leq H^\prime < 5 \\
      (C, 0, X) &\mbox{if } 5 \leq H^\prime < 6
    \end{cases}
</math>
 
Then we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match luma:
 
:<math>\begin{align}
  &m = Y^\prime_{601} - (.30R_1 + .59G_1 + .11B_1) \\
  &(R, G, B) = (R_1 + m, G_1 + m, B_1 + m)
\end{align}</math>
 
== Swatches ==
Mouse over the swatches below to see the ''R'', ''G'', and ''B'' values for each swatch in a [[tooltip]].
 
=== HSV ===
{{hsv-swatches}}
 
=== HSL ===
{{hsl-swatches}}
 
== Notes and references ==
{{reflist|35em|refs=
<ref name=Cheng>{{cite journal|author=Heng-Da Cheng, Xihua Jiang, Angela Sun, and Jingli Wang|doi=10.1016/S0031-3203(00)00149-7|title=Color image segmentation: Advances and prospects|year=2001|journal=Pattern Recognition|volume=34|issue=12|pages=2259}} This computer vision literature review briefly summarizes research in color image segmentation, including that using HSV and HSI representations.
</ref>
}}
 
==Bibliography==
* {{cite book|ref=Agoston |author=Agoston, Max K. |year=2005|url=http://books.google.com/books?id=fGX8yC-4vXUC&pg=PA300 |title=Computer Graphics and Geometric Modeling: Implementation and Algorithms|place= London|publisher= Springer|isbn=1-85233-818-0|pages=300–306}} Agoston’s book contains a description of HSV and HSL, and algorithms in [[pseudocode]] for converting to each from RGB, and back again.
*{{cite book|ref= Fairchild|author=Fairchild, Mark D. |year=2005|url=http://www.cis.rit.edu/fairchild/CAM.html |title=Color Appearance Models|edition= 2nd|publisher= Addison-Wesley}} This book doesn’t discuss HSL or HSV specifically, but is one of the most readable and precise resources about current color science.
* {{cite book|ref= Foley|authorlink=James D. Foley|author=Foley, J. D. et al. |year=1995|url=http://www.pearsonhighered.com/educator/academic/product/0,,0201848406,00%2Ben-USS_01DBC.html |title=Computer Graphics: Principles and Practice|edition= 2nd |place=Redwood City, CA|publisher= Addison-Wesley|isbn=0-201-84840-6}} The standard computer graphics textbook of the 1990s, this tome has a chapter full of algorithms for converting between color models, in [[C (programming language)|C]].
*{{cite book|ref=Hanbury2002|author=Allan Hanbury and Jean Serra |date=December 2002|title=A 3D-polar Coordinate Colour Representation Suitable for Image Analysis|work= Pattern Recognition and Image Processing Group Technical Report 77|place= Vienna, Austria|publisher= Vienna University of Technology}}
*{{cite journal|ref=Joblove|author=Joblove, George H. and Greenberg, Donald |date=August 1978|url=http://portal.acm.org/citation.cfm?id=807362 |title=Color spaces for computer graphics|journal= [[Computer Graphics (publication)|Computer Graphics]]|volume=12|issue=3|pages= 20–25|doi=10.1145/965139.807362}} Joblove and Greenberg’s paper was the first describing the HSL model, which it compares to HSV.
*{{cite book|ref=Kuehni|author= Kuehni, Rolf G. |year=2003|title=Color Space and Its Divisions: Color Order from Antiquity to the present|place=New York|publisher= Wiley|isbn=978-0-471-32670-0}} This book only briefly mentions HSL and HSV, but is a comprehensive description of color order systems through history.
* {{cite journal|ref=Levkowitz|author=Levkowitz, Haim and Herman, Gabor T. |year=1993|title=GLHS: A generalised lightness, hue and saturation color model|journal=CVGIP: Graphical Models and Image Processing|volume=55|issue=4|pages=271–285|doi=10.1006/cgip.1993.1019}} This paper explains how both HSL and HSV, as well as other similar models, can be thought of as specific variants of a more general "GLHS" model. Levkowitz and Herman provide pseudocode for converting from RGB to GLHS and back.
* {{cite web|ref=MacEvoy|author=MacEvoy, Bruce |date=January 2010|url=http://www.handprint.com/LS/CVS/color.html |title=Color Vision|work=handprint.com}}. Especially the sections about [http://www.handprint.com/HP/WCL/color7.html "Modern Color Models"] and [http://www.handprint.com/HP/WCL/color18a.html "Modern Color Theory"]. MacEvoy’s extensive site about color science and paint mixing is one of the best resources on the web. On this page, he explains the color-making attributes, and the general goals and history of color order systems – including HSL and HSV – and their practical relevance to painters.
* {{cite web|ref=Poynton |author=Poynton, Charles |year=1997|url=http://www.poynton.com/ColorFAQ.html |title=Frequently Asked Questions About Color}} This self-published frequently asked questions page, by digital video expert Charles Poynton, explains, among other things, why in his opinion these models "are useless for the specification of accurate color", and should be abandoned in favor of more psychometrically relevant models.
*{{cite journal|ref=Smith|author=Smith, Alvy Ray |authorlink=Alvy Ray Smith|date=August 1978|url=http://portal.acm.org/citation.cfm?id=807361 |title=Color gamut transform pairs|journal=Computer Graphics|volume=12|issue=3|pages=12–19|doi=10.1145/965139.807361}} This is the original paper describing the "hexcone" model, HSV. Smith was a researcher at [[New York Institute of Technology|NYIT]]’s Computer Graphics Lab. He describes HSV’s use in an early [[raster graphics|digital painting]] program.
 
==External links==
* [http://www.cs.rit.edu/~ncs/color/a_spaces.html Demonstrative color conversion applet]
* [http://demonstrations.wolfram.com/HSVColors/ HSV Colors] by Hector Zenil, [[The Wolfram Demonstrations Project]].
* [http://subtilitas.org/hsv/indexEn.htm HSV demonstration]
 
{{color space|state=expanded}}
 
{{DEFAULTSORT:Hsl And Hsv}}
[[Category:Color space]]

Revision as of 18:43, 3 March 2014

Luke is usually a superstar within the building as well as the vocation growth initial 2nd to his 3rd casio album, And , will be the resistant. He burst to the picture in 2013 along with his best blend of downward-residence convenience, movie celebrity fantastic looks and tickets to luke bryan concert words, is placed t in the major way. The latest recording Top around the nation graph or chart and #2 in the pop charts, creating it the next maximum first appearance at that time of 2014 to get a land performer.

The boy of your , is aware of patience and dedication are key elements with regards to an excellent job- . His to start with recording, Stay Me, made the Top hits “All My Buddies “Country and Say” Person,” although cheap tickets for luke bryan (relevant internet site) his effort, Doin’ Issue, located the artist-3 direct No. 2 single people: In addition Contacting Is really a Excellent Thing.”

During the tumble of 2011, tickets for sale - www.ladyhawkshockey.org, Concert tours: Bryan And which had an impressive set of , which includes City. “It’s much like you’re getting a authorization to travel one stage further, says these performers that were a part of the Tourabove in to a greater amount of designers.” It packaged among the most successful excursions within its 10-year background.

Also visit my web site; luke bryan tickets