HSL and HSV
   HOME

TheInfoList



OR:

HSL (for hue, saturation, lightness) and HSV (for hue, saturation, value; also known as HSB, for hue, saturation, brightness) are alternative representations of the RGB color model, designed in the 1970s by
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
researchers to more closely align with the way human vision perceives color-making attributes. In these models, colors of each '' hue'' are arranged in a radial slice, around a central axis of neutral colors which ranges from black at the bottom to white at the top. The HSL representation models the way different paints mix together to create color in the real world, with the ''lightness'' dimension resembling the varying amounts of black or white paint in the mixture (e.g. to create "light red", a red pigment can be mixed with white paint; this white paint corresponds to a high "lightness" value in the HSL representation). Fully saturated colors are placed around a circle at a lightness value of ½, with a lightness value of 0 or 1 corresponding to fully black or white, respectively. Meanwhile, the HSV representation models how colors appear under light. The difference between HSL and HSV is that a color with maximum lightness in HSL is pure white, but a color with maximum value/brightness in HSV is analogous to shining a white light on a colored object (e.g. shining a bright white light on a red object causes the object to still appear red, just brighter and more intense, while shining a dim light on a red object causes the object to appear darker and less bright). The issue with both HSV and HSL is that these approaches do not effectively separate color into their three value components according to human perception of color. This can be seen when the saturation settings are altered — it is quite easy to notice the difference in perceptual lightness despite the "V" or "L" setting being fixed.


Basic principle

HSL and HSV are both cylindrical geometries (), with hue, their angular dimension, starting at the red
primary Primary or primaries may refer to: Arts, entertainment, and media Music Groups and labels * Primary (band), from Australia * Primary (musician), hip hop musician and record producer from South Korea * Primary Music, Israeli record label Works ...
at 0°, passing through the
green Green is the color between cyan and yellow on the visible spectrum. It is evoked by light which has a dominant wavelength of roughly 495570 nm. In subtractive color systems, used in painting and color printing, it is created by a combin ...
primary at 120° and the
blue Blue is one of the three primary colours in the RYB colour model (traditional colour theory), as well as in the RGB (additive) colour model. It lies between violet and cyan on the spectrum of visible light. The eye perceives blue when ...
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 top to bottom, white at lightness 1 (value 1) to black at lightness 0 (value 0). In both geometries, the additive primary and
secondary color A secondary color is a color made by mixing of two primary colors in a given color space. Additive secondaries Light (RGB) For the human eye, good primary colors of light are red, green, and blue. Combining lights of these colors produces ...
s—red,
yellow Yellow is the color between green and orange on the spectrum of light. It is evoked by light with a dominant wavelength of roughly 575585 nm. It is a primary color in subtractive color systems, used in painting or color printing. In th ...
, green,
cyan Cyan () is the color between green and blue on the visible spectrum of light. It is evoked by light with a predominant wavelength between 490 and 520 nm, between the wavelengths of green and blue. In the subtractive color system, or CMYK col ...
, blue and
magenta Magenta () is a color that is variously defined as pinkish- purplish- red, reddish-purplish-pink or mauvish-crimson. On color wheels of the RGB (additive) and CMY (subtractive) color models, it is located exactly midway between red and blu ...
—and linear mixtures between adjacent pairs of them, sometimes called ''pure colors'', are arranged around the outside edge of the cylinder with saturation 1. These saturated colors have lightness 0.5 in HSL, while in HSV they have value 1. Mixing these pure colors with black—producing so-called ''
shades Sunglasses or sun glasses (informally called shades or sunnies; more names Sunglasses#Other names, below) are a form of Eye protection, protective eyewear designed primarily to prevent bright sunlight and high-energy visible light from damagin ...
''—leaves saturation unchanged. In HSL, saturation is also unchanged by '' tinting'' with white, and only mixtures with both black and white—called ''tones''—have saturation less than 1. In HSV, tinting alone reduces saturation. Because these definitions of saturation—in which very dark (in both models) or very light (in HSL) near-neutral colors are considered fully saturated (for instance, from the bottom right in the sliced HSL cylinder or from the top right)—conflict with the intuitive notion of color purity, often a conic or
biconic Many shapes have metaphorical names, i.e., their names are metaphors: these shapes are named after a most common object that has it. For example, "U-shape" is a shape that resembles the letter U, a bell-shaped curve has the shape of the vertical ...
solid is drawn instead (), with what this article calls '' chroma'' as its radial dimension (equal to the range of the RGB values), instead of saturation (where the saturation is equal to the chroma over the maximum chroma in that slice of the (bi)cone). Confusingly, such diagrams usually label this radial dimension "saturation", blurring or erasing the distinction between saturation and chroma. 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" ( ).


Motivation

The HSL color space was invented for television in 1938 by
Georges Valensi M. Georges Valensi (1889–1980) was a French telecommunications engineer who, in 1938, invented and patented a method of transmitting color images via luma and chrominance so that they could be received on both color and black & white television ...
as a method to add color encoding to existing monochrome (i.e. only containing the L signal) broadcasts, allowing existing receivers to receive new color broadcasts (in black and white) without modification as the
luminance Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls with ...
(black and white) signal is broadcast unmodified. It has been used in all major analog broadcast television encoding including
NTSC The first American standard for analog television broadcast was developed by National Television System Committee (NTSC)National Television System Committee (1951–1953), Report and Reports of Panel No. 11, 11-A, 12–19, with Some supplement ...
, PAL and
SECAM SECAM, also written SÉCAM (, ''Séquentiel de couleur à mémoire'', French for ''color sequential with memory''), is an analog color television system that was used in France, some parts of Europe and Africa, and Russia. It was one of th ...
and all major digital broadcast systems and is the basis for
composite video Composite video is an analog video signal format that carries standard-definition video (typically at 525 lines or 625 lines) as a single channel. Video information is encoded on one channel, unlike the higher-quality S-Video (two channe ...
. Most televisions, computer displays, and projectors produce colors by combining red, green, and blue light in varying intensities—the so-called RGB additive
primary color A set of primary colors or primary colours (see spelling differences) consists of colorants or colored lights that can be mixed in varying amounts to produce a gamut of colors. This is the essential method used to create the perception of a ...
s. The resulting mixtures in
RGB color space An RGB color space is any additive color space based on the RGB color model. An RGB color space is defined by chromaticity coordinates of the red, green, and blue additive primaries, the white point which is usually a standard illuminant, an ...
can reproduce a wide variety of colors (called a
gamut In color reproduction, including computer graphics and photography, the gamut, or color gamut , is a certain ''complete subset'' of colors. The most common usage refers to the subset of colors which can be accurately represented in a given circ ...
); 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 Subtractive color or subtractive color mixing predicts the spectral power distribution of light after it passes through successive layers of partially absorbing media. This idealized model is the essential principle of how dyes and inks are use ...
mixing of paints or traditional artists' models based on tints and shades (). Furthermore, neither additive nor subtractive color models define color relationships the same way the
human eye The human eye is a sensory organ, part of the sensory nervous system, that reacts to visible light and allows humans to use visual information for various purposes including seeing things, keeping balance, and maintaining circadian rhythm. ...
does. For example, imagine we have an RGB display whose color is controlled by three
sliders Slider or Sliders may refer to: Arts * K.K. Slider, a fictional character within the ''Animal Crossing'' franchise * ''The Slider'', a 1972 album by T. Rex * ''Sliders'' (TV series), an American science fiction and fantasy television series * ...
ranging from , one controlling the intensity of each of the red, green, and blue primaries. If we begin with a relatively colorful orange , with
sRGB sRGB is a standard RGB (red, green, blue) color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the World Wide Web. It was subsequently standardized by the International Electrotechnical Commission ...
values , , , and want to reduce its colorfulness by half to a less saturated orange , we would need to drag the sliders to decrease ''R'' by 31, increase ''G'' by 24, and increase ''B'' by 59, as pictured below. In an attempt to accommodate more traditional and intuitive color mixing models, computer graphics pioneers at PARC and NYIT introduced the HSV model for computer display technology in the mid-1970s, formally described by
Alvy Ray Smith Alvy Ray Smith III (born September 8, 1943) is an American computer scientist who co-founded Lucasfilm's Computer Division and Pixar, participating in the 1980s and 1990s expansion of computer animation into feature film. Education In 1965, ...
Smith (1978) in the August 1978 issue of ''Computer Graphics''. In the same issue, Joblove and Greenberg Joblove and Greenberg (1978) described the HSL model—whose dimensions they labeled ''hue'', ''relative chroma'', and ''intensity''—and compared it to HSV (). Their model was based more upon how colors are organized and conceptualized in
human vision Visual perception is the ability to interpret the surrounding environment through photopic vision (daytime vision), color vision, scotopic vision (night vision), and mesopic vision (twilight vision), using light in the visible spectrum refle ...
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 SIGGRAPH (Special Interest Group on Computer Graphics and Interactive Techniques) is an annual conference on computer graphics (CG) organized by the ACM SIGGRAPH, starting in 1974. The main conference is held in North America; SIGGRAPH Asia ...
,
Tektronix Tektronix, Inc., historically widely known as Tek, is an American company best known for manufacturing test and measurement devices such as oscilloscopes, logic analyzers, and video and mobile test protocol equipment. Originally an independent ...
introduced graphics terminals using HSL for color designation, and the Computer Graphics Standards Committee recommended it in their annual status report (). 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
below Below may refer to: *Earth * Ground (disambiguation) *Soil *Floor * Bottom (disambiguation) *Less than *Temperatures below freezing *Hell or underworld People with the surname *Ernst von Below (1863–1955), German World War I general *Fred Below ...
.


Formal derivation


Color-making attributes

The dimensions of the HSL and HSV geometries—simple transformations of the not-perceptually-based RGB model—are not directly related to the photometric color-making attributes of the same names, as defined by scientists such as the CIE or
ASTM ASTM International, formerly known as American Society for Testing and Materials, is an international standards organization that develops and publishes voluntary consensus technical standards for a wide range of materials, products, systems, an ...
. Nonetheless, it is worth reviewing those definitions before leaping into the derivation of our models. For the definitions of color-making attributes which follow, see: Kuehni (2003) Poynton (1997) ; Hue: The "attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors: red, yellow, green, and blue, or to a combination of two of them". ;
Radiance In radiometry, radiance is the radiant flux emitted, reflected, transmitted or received by a given surface, per unit solid angle per unit projected area. Radiance is used to characterize diffuse emission and reflection of electromagnetic radiati ...
(''L''e,Ω): The
radiant power In radiometry, radiant flux or radiant power is the radiant energy emitted, reflected, transmitted, or received per unit time, and spectral flux or spectral power is the radiant flux per unit frequency or wavelength, depending on whether the spec ...
of light passing through a particular surface per unit
solid angle In geometry, a solid angle (symbol: ) is a measure of the amount of the field of view from some particular point that a given object covers. That is, it is a measure of how large the object appears to an observer looking from that point. The poi ...
per unit projected area, measured in
SI units The International System of Units, known by the international abbreviation SI in all languages and sometimes pleonastically as the SI system, is the modern form of the metric system and the world's most widely used system of measurement. ...
in
watt The watt (symbol: W) is the unit of power or radiant flux in the International System of Units (SI), equal to 1 joule per second or 1 kg⋅m2⋅s−3. It is used to quantify the rate of energy transfer. The watt is named after James ...
per steradian per
square metre The square metre ( international spelling as used by the International Bureau of Weights and Measures) or square meter (American spelling) is the unit of area in the International System of Units (SI) with symbol m2. It is the area of a square ...
(). ;
Luminance Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls with ...
(''Y'' or ''L''v,Ω): The radiance weighted by the effect of each wavelength on a typical human observer, measured in SI units in candela per square meter (). Often the term ''luminance'' is used for the
relative luminance Relative luminance Y follows the photometric definition of luminance L including spectral weighting for human vision, but while luminance L is a measure of light in units such as cd/m^2, Relative luminance Y values are normalized as 0.0 to 1.0 ...
, ''Y''/''Y''''n'', where ''Y''''n'' is the luminance of the reference
white point A white point (often referred to as reference white or target white in technical documents) is a set of tristimulus values or chromaticity coordinates that serve to define the color "white" in image capture, encoding, or reproduction. Depending ...
. ; Luma (''Y′''): The weighted sum of gamma-corrected , , and values, and used in , for
JPEG JPEG ( ) is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and imag ...
compression and video transmission. ; Brightness (or value): The "attribute of a visual sensation according to which an area appears to emit more or less light". ;
Lightness Lightness is a visual perception of the luminance (L) of an object. It is often judged relative to a similarly lit object. In colorimetry and color appearance models, lightness is a prediction of how an illuminated color will appear to a stan ...
: The "brightness relative to the brightness of a similarly illuminated white". ;
Colorfulness Colorfulness, chroma and saturation are attributes of perceived color relating to chromatic intensity. As defined formally by the International Commission on Illumination (CIE) they respectively describe three different aspects of chromati ...
: The "attribute of a visual sensation according to which the perceived color of an area appears to be more or less chromatic". ; Chroma: The "colorfulness relative to the brightness of a similarly illuminated white". ; Saturation: The "colorfulness of a stimulus relative to its own brightness". ''Brightness'' and ''colorfulness'' are absolute measures, which usually describe the spectral distribution of light entering the eye, while ''lightness'' and ''chroma'' are measured relative to some white point, and are thus often used for descriptions of surface colors, remaining roughly constant even as brightness and colorfulness change with different illumination. ''Saturation'' can be defined as either the ratio of colorfulness to brightness, or that 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 HSL and HSV model-builders took an RGB cube—with constituent amounts of red, green, and blue light in a color denoted —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.


Hue and chroma

In each of our models, we calculate both ''hue'' and what this article will call ''chroma'', after Joblove and Greenberg (1978), 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
project A project is any undertaking, carried out individually or collaboratively and possibly involving research or design, that is carefully planned to achieve a particular goal. An alternative view sees a project managerially as a sequence of even ...
it onto the "chromaticity plane"
perpendicular In elementary geometry, two geometric objects are perpendicular if they intersect at a right angle (90 degrees or π/2 radians). The condition of perpendicularity may be represented graphically using the '' perpendicular symbol'', ⟂. It c ...
to the neutral axis, our projection takes the shape of a hexagon, with red, yellow, green, cyan, blue, and magenta at its corners (). ''Hue'' is roughly the angle of the
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
to a point in the projection, with red at 0°, while ''chroma'' is roughly the distance of the point from the origin. 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 adjacent diagram, this is the ratio of lengths , or alternatively 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, minimum, and chroma component values as ''M'', ''m'', and ''C'', respectively. : M = \max(R, G, B) : m = \min(R, G, B) : C = \operatorname(R, G, B) = M - m To understand why chroma can be written as , notice that any neutral color, with , 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, any two colors of and project on the same point, and have the same chroma. The chroma of a color with one of its components equal to zero 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 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 but now typically measured in degrees . 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 In mathematics, a piecewise-defined function (also called a piecewise function, a hybrid function, or definition by cases) is a function defined by multiple sub-functions, where each sub-function applies to a different interval in the domain. P ...
: : H' = \begin \mathrm, &\text C = 0 \\ \frac \bmod 6, &\text M = R \\ \frac + 2, &\text M = G \\ \frac + 4, &\text M = B \end : H = 60^\circ \times H' Sometimes, neutral colors (i.e. with ) are assigned a hue of 0° for convenience of representation. 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 (). 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
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
pointing to a color. Sometimes for image analysis applications, this hexagon-to-circle transformation is skipped, and ''hue'' and ''chroma'' (we'll denote these ''H''2 and ''C''2) are defined by the usual cartesian-to-polar coordinate transformations (). The easiest way to derive those is via a pair of cartesian chromaticity coordinates which we'll call ''α'' and ''β'': Hanbury and Serra (2002) Hanbury (2008) : \alpha = R - G \cdot \cos(60^) - B \cdot \cos(60^) = \tfrac(2R - G - B) : \beta = G \cdot \sin(60^) - B \cdot \sin(60^) = \tfrac(G - B) : H_2 = \operatorname(\beta, \alpha) : C_2 = \operatorname(\alpha, \beta) = \sqrt (The
atan2 In computing and mathematics, the function atan2 is the 2-argument arctangent. By definition, \theta = \operatorname(y, x) is the angle measure (in radians, with -\pi < \theta \leq \pi) between the positive
function, a "two-argument arctangent", computes the angle from a cartesian coordinate pair.) Notice that these two definitions of hue (''H'' and ''H''2) nearly coincide, with a maximum difference between them for any color of about 1.12°—which occurs at twelve particular hues, for instance , —and with for every multiple of 30°. The two definitions of chroma (''C'' and ''C''2) differ more substantially: they are equal at the corners of our hexagon, but at points halfway between two corners, such as , we have , but , a difference of about 13.4%.


Lightness

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 (; three of these are also shown in
): * The simplest definition is just the
arithmetic mean In mathematics and statistics, the arithmetic mean ( ) or arithmetic average, or just the '' mean'' or the ''average'' (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the collection. The co ...
, i.e. average, of the three components, in the HSI model called ''intensity'' (). 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. *: I = \operatorname(R, G, B) = \tfrac(R + G + B) * In the HSV "hexcone" model, ''value'' is defined as the largest component of a color, our ''M'' above (). 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 In geometry, a hexagonal pyramid is a pyramid with a hexagonal base upon which are erected six isosceles triangular faces that meet at a point (the apex). Like any pyramid, it is self-dual. A right hexagonal pyramid with a regular hexagon base ...
out of the RGB cube. *: V = \max(R, G, B) = M * In the HSL "bi-hexcone" model, ''lightness'' is defined as the average of the largest and smallest color components (), i.e. the
mid-range In statistics, the mid-range or mid-extreme is a measure of central tendency of a sample defined as the arithmetic mean of the maximum and minimum values of the data set: :M=\frac. The mid-range is closely related to the range, a measure of ...
of the RGB components. 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, shown above. *: L = \operatorname(R, G, B) = \tfrac(M + m) * A more perceptually relevant alternative is to use ''luma'', , as a lightness dimension (). Luma is the
weighted average The weighted arithmetic mean is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The ...
of gamma-corrected ''R'', ''G'', and ''B'', based on their contribution to perceived lightness, long used as the monochromatic dimension in color television broadcast. For
sRGB sRGB is a standard RGB (red, green, blue) color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the World Wide Web. It was subsequently standardized by the International Electrotechnical Commission ...
, the Rec. 709 primaries yield , digital
NTSC The first American standard for analog television broadcast was developed by National Television System Committee (NTSC)National Television System Committee (1951–1953), Report and Reports of Panel No. 11, 11-A, 12–19, with Some supplement ...
uses according to
Rec. 601 ITU-R Recommendation BT.601, more commonly known by the abbreviations Rec. 601 or BT.601 (or its former name CCIR 601) is a standard originally issued in 1982 by the CCIR (an organization, which has since been renamed as the Internatio ...
and some other primaries are also in use which result in different coefficients. *: Y'_\text = 0.2989\cdot R + 0.5870\cdot G + 0.1140\cdot B (SDTV) *: Y'_\text = 0.212\cdot R + 0.701\cdot G + 0.087\cdot B (Adobe) *: Y'_\text = 0.2126\cdot R + 0.7152\cdot G + 0.0722\cdot B (HDTV) *: Y'_\text = 0.2627\cdot R + 0.6780\cdot G + 0.0593\cdot B (UHDTV, HDR) All four of these leave the neutral axis alone. That is, for colors with , any of the four formulations yields a lightness equal to the value of ''R'', ''G'', or ''B''. For a graphical comparison, see fig. 13 below.


Saturation

When encoding 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 denotable using , , and 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 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 or a lighter purple of exactly the same chroma as the original color To solve problems such as these, the HSL and HSV models scale the chroma so that it always fits into the range 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. : S_V = \begin 0, &\text V = 0 \\ \frac, &\text \end :S_L = \begin 0, &\text L = 1 \text L = 0 \\ \frac, &\text \end The HSI model commonly used for computer vision, which takes ''H''2 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 (). See the Use in image analysis section of this article. Cheng et al. (2001) : S_I = \begin 0, &\text I = 0 \\ 1 - \frac, &\text \end 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''2).


Examples

All parameter values shown below are given as values in the interval , except those for ''H'' and ''H''2 which are in the interval .


Use in end-user software

The original purpose of HSL and HSV and similar models, and their most common current application, is in 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 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. 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
frameworks A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
. The
CSS 3 Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
specification allows web authors to specify colors for their pages directly with HSL coordinates. HSL and HSV are sometimes used to define gradients for
data visualization Data and information visualization (data viz or info viz) is an interdisciplinary field that deals with the graphic representation of data and information. It is a particularly efficient way of communicating when the data or information is nu ...
, as in maps or medical images. For example, the popular GIS program
ArcGIS ArcGIS is a family of client, server and online geographic information system (GIS) software developed and maintained by Esri. ArcGIS was first released in 1999 and originally was released as ARC/INFO, a command line based GIS system for manipul ...
historically applied customizable HSV-based gradients to numerical geographical data.
Image editing Image editing encompasses the processes of altering images, whether they are digital photographs, traditional photo-chemical photographs, or illustrations. Traditional analog image editing is known as photo retouching, using tools such as a ...
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 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 Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
image viewer and color editor xv allowed six user-definable hue (''H'') ranges to be rotated and resized, included a dial-like control for saturation (''S''''HSV''), and a
curves A curve is a geometrical object in mathematics. Curve(s) may also refer to: Arts, entertainment, and media Music * Curve (band), an English alternative rock music group * ''Curve'' (album), a 2012 album by Our Lady Peace * "Curve" (song), a ...
-like interface for controlling value (''V'')—see fig. 17. The image editor 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. Video editors also use these models. For example, both Avid and
Final Cut Pro Final Cut Pro is a series of non-linear video editing software programs first developed by Macromedia Inc. and later Apple Inc. The most recent version, Final Cut Pro 10.6.4, runs on Mac computers powered by macOS Big Sur 11.5.1 or later. The ...
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 A blend is a mixture of two or more different things or substances; e.g., a product of a mixer or blender. Blend Blend may also refer to: * Blend word, a word formed from parts of other words * ''Blend'' (album), a 1996 album by BoDeans * B ...
composite layers using a luma/chroma/hue color geometry. These have been copied widely, but several imitators use the HSL (e.g.
PhotoImpact Ulead PhotoImpact (originally called Iedit) is a raster and vector graphics editing program published by Ulead Systems. Alongside its image editing capabilities, the program also features HTML tools, such as a rollover assistant, an imagemap as ...
, Paint Shop Pro) or HSV geometries instead.


Use in image analysis

HSL, HSV, HSI, or related models are often used in
computer vision Computer vision is an interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate tasks that the human ...
and
image analysis Image analysis or imagery analysis is the extraction of meaningful information from images; mainly from digital images by means of digital image processing techniques. Image analysis tasks can be as simple as reading bar coded tags or as soph ...
for feature detection or image segmentation. The applications of such tools include object detection, for instance in robot vision;
object recognition Object recognition – technology in the field of computer vision for finding and identifying objects in an image or video sequence. Humans recognize a multitude of objects in images with little effort, despite the fact that the image of the ...
, for instance of faces,
text Text may refer to: Written word * Text (literary theory), any object that can be read, including: **Religious text, a writing that a religious tradition considers to be sacred **Text, a verse or passage from scripture used in expository preachin ...
, or license plates; content-based image retrieval; and analysis of medical images. For the most part, computer vision algorithms used on color images are straightforward extensions to algorithms designed for
grayscale In digital photography, computer-generated imagery, and colorimetry, a grayscale image is one in which the value of each pixel is a single sample representing only an ''amount'' of light; that is, it carries only intensity information. Graysc ...
images, for instance k-means or
fuzzy clustering Fuzzy clustering (also referred to as soft clustering or soft ''k''-means) is a form of clustering in which each data point can belong to more than one cluster. Clustering or cluster analysis involves assigning data points to clusters such that i ...
of pixel colors, or canny
edge detection Edge detection includes a variety of mathematical methods that aim at identifying edges, curves in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. The same problem of finding discontinuitie ...
. At the simplest, each color component is separately passed through the same algorithm. It is important, therefore, that the
features Feature may refer to: Computing * Feature (CAD), could be a hole, pocket, or notch * Feature (computer vision), could be an edge, corner or blob * Feature (software design) is an intentional distinguishing characteristic of a software ite ...
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. 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.


Disadvantages

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. 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 The CIELAB color space, also referred to as ''L*a*b*'' , is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. (Referring to CIELAB as "Lab" without asterisks should be avoided to prevent confusio ...
(see
below Below may refer to: *Earth * Ground (disambiguation) *Soil *Floor * Bottom (disambiguation) *Less than *Temperatures below freezing *Hell or underworld People with the surname *Ernst von Below (1863–1955), German World War I general *Fred 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 spaces: 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 Gamma correction or gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in video or still image systems. Gamma correction is, in the simplest cases, defined by the following power-law expression: : V_\tex ...
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 (). 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. 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 and white 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 —is held to have the same saturation as the green primary 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 The American Statistical Association (ASA) is the main professional organization for statisticians and related professionals in the United States. It was founded in Boston, Massachusetts on November 27, 1839, and is the second oldest continuousl ...
: 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 toward green 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— to (the latter is more colorful and slightly darker). In the example below (), the image on the left (a) is the original photograph of a
green turtle The green sea turtle (''Chelonia mydas''), also known as the green turtle, black (sea) turtle or Pacific green turtle, is a species of large sea turtle of the family Cheloniidae. It is the only species in the genus ''Chelonia''. Its range exten ...
. In the middle image (b), we have rotated the hue (''H'') of each color by , 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. 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 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. Charles Poynton, digital video expert, lists the above problems with HSL and HSV in his ''Color FAQ'', and concludes that:


Other cylindrical-coordinate color models

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.


Color conversion formulae

To convert from HSL or HSV to RGB, we essentially invert the steps listed above (as before, ). 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.


To RGB


HSL to RGB

Given a color with hue , saturation , and lightness , we first find chroma: : C = (1 - \left\vert 2 L - 1 \right\vert) \times S_L Then we can find a point 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): : H^\prime = \frac : X = C \times (1 - , H^\prime \;\bmod 2 - 1, ) In the above equation, the notation H^\prime \;\bmod 2 refers to the remainder of the Euclidean division of H^\prime by 2. H^\prime is not necessarily an integer. : (R_1, G_1, B_1) = \begin (C, X, 0) &\text 0 \leq H^\prime < 1 \\ (X, C, 0) &\text 1 \leq H^\prime < 2 \\ (0, C, X) &\text 2 \leq H^\prime < 3 \\ (0, X, C) &\text 3 \leq H^\prime < 4 \\ (X, 0, C) &\text 4 \leq H^\prime < 5 \\ (C, 0, X) &\text 5 \leq H^\prime < 6 \end When H^\prime is an integer, the "neighbouring" formula would yield the same result, as X = 0 or X = C, as appropriate. Finally, we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match lightness: : m = L-\frac : (R,G,B) = (R_+m,G_+m,B_+m)


= HSL to RGB alternative

= The polygonal piecewise functions can be somewhat simplified by a clever use of minimum and maximum values as well as the remainder operation. Given a color with hue H \in ^\circ,360^\circ/math>, saturation S=S_L \in ,1/math>, and lightness L \in ,1/math>, we first define the function: : f(n) = L - a \max(-1, \min(k-3,9-k,1)) where k,n \in \mathbb R_ and: : k = (n+\frac) \bmod 12 : a = S_L \min(L,1-L) And output R,G,B values (from ,13) are: : (R,G,B) = (f(0), f(8), f(4)) The above alternative formulas allow for shorter implementations. In the above formulas the a\bmod b operation also returns the fractional part of the module e.g. 7.4 \bmod 6 = 1.4, and k \in [0,12). The base shape T(k) = t(n,H) = \max(\min(k-3,9-k,1), -1) is constructed as follows: t_1 = \min(k-3,9-k) is a "triangle" for which values greater or equal to −1 start from k=2 and end at k=10, and the highest point is at k=6. Then by t_2 = \min(t_1,1) = \min(k-3,9-k,1) we change values bigger than 1 to equal 1. Then by t = \max(t_2,-1) we change values less than −1 to equal −1. At this point we get something similar to the red shape from fig. 24 after a vertical flip (where the maximum is 1 and the minimum is −1). The R,G,B functions of H use this shape transformed in following way: modulo-shifted on X (by n) (differently for R,G,B) scaled on Y (by -a) and shifted on Y (by L). We observe following shape properties (Fig. 24 can help to get intuition about them): : t(n,H) = -t(n+6,H) : \min\ (t(n,H), t(n+4,H), t(n+8,H)) = -1 : \max\ (t(n,H), t(n+4,H), t(n+8,H)) = +1


HSV to RGB

Given an HSV color with hue , saturation , and value , we can use the same strategy. First, we find chroma: : C = V \times S_V Then we can, again, find a point 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): : H^\prime = \frac : X = C \times (1 - , H^\prime \bmod 2 - 1, ) : (R_1, G_1, B_1) = \begin (C, X, 0) &\text 0 \leq H^\prime < 1 \\ (X, C, 0) &\text 1 \leq H^\prime < 2 \\ (0, C, X) &\text 2 \leq H^\prime < 3 \\ (0, X, C) &\text 3 \leq H^\prime < 4 \\ (X, 0, C) &\text 4 \leq H^\prime < 5 \\ (C, 0, X) &\text 5 \leq H^\prime < 6 \end As before, when H^\prime is an integer, "neighbouring" formulas would yield the same result. Finally, we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match value: : m = V - C : (R, G, B) = (R_1 + m, G_1 + m, B_1 + m)


= HSV to RGB alternative

= Given a color with hue H \in ^\circ,360^\circ/math>, saturation S=S_V \in ,1/math>, and value V \in ,1/math>, first we define function : : f(n) = V - VS \max(0, \min(k, 4-k, 1)) where k,n \in \mathbb R_ and: : k = (n+\frac) \bmod 6 And output R,G,B values (from ,13) are: : (R,G,B) = (f(5), f(3), f(1)) Above alternative equivalent formulas allow shorter implementation. In above formulas the a\bmod b returns also fractional part of module e.g. the formula 7.4 \bmod 6 = 1.4. The values of k \in \mathbb R \land k \in [0,6). The base shape : t(n,H) = T(k) = \max(0, \min(k, 4-k, 1)) is constructed as follows: t_1 = \min(k,4-k) is "triangle" for which non-negative values starts from k=0, highest point at k=2 and "ends" at k=4, then we change values bigger than one to one by t_2 = \min(t_1,1) = \min(k,4-k,1), then change negative values to zero by t = \max(t2,0) – and we get (for n=0) something similar to green shape from Fig. 24 (which max value is 1 and min value is 0). The R,G,B functions of H use this shape transformed in following way: modulo-shifted on X (by n) (differently for R,G,B) scaled on Y (by -VS) and shifted on Y (by V). We observe following shape properties(Fig. 24 can help to get intuition about this): : t(n,H) = 1-t(n+3,H) : \min(t(n,H), t(n+2,H), t(n+4,H)) = 0 : \max(t(n,H), t(n+2,H), t(n+4,H)) = 1


HSI to RGB

Given an HSI color with hue , saturation , and intensity , we can use the same strategy, in a slightly different order: : H^\prime = \frac : Z = 1 - , H^\prime \;\bmod 2 - 1, : C = \frac : X = C \cdot Z Where C is the chroma. Then we can, again, find a point 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): : (R_1, G_1, B_1) = \begin (0, 0, 0) &\text H \text \\ (C, X, 0) &\text 0 \leq H^\prime \leq 1 \\ (X, C, 0) &\text 1 \leq H^\prime \leq 2 \\ (0, C, X) &\text 2 \leq H^\prime \leq 3 \\ (0, X, C) &\text 3 \leq H^\prime \leq 4 \\ (X, 0, C) &\text 4 \leq H^\prime \leq 5 \\ (C, 0, X) &\text 5 \leq H^\prime < 6 \end Overlap (when H^\prime is an integer) occurs because two ways to calculate the value are equivalent: X = 0 or X = C, as appropriate. Finally, we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match lightness: : m = I \cdot (1 - S_I) : (R, G, B) = (R_1 + m, G_1 + m, B_1 + m)


Luma, chroma and hue to RGB

Given a color with hue , chroma , and luma , we can again use the same strategy. Since we already have ''H'' and ''C'', we can straightaway find our point along the bottom three faces of the RGB cube: : \begin H^\prime &= \frac \\ X &= C \times (1 - , H^\prime \bmod 2 - 1, ) \end : (R_1, G_1, B_1) = \begin (0, 0, 0) &\text H \text \\ (C, X, 0) &\text 0 \leq H^\prime \leq 1 \\ (X, C, 0) &\text 1 \leq H^\prime \leq 2 \\ (0, C, X) &\text 2 \leq H^\prime \leq 3 \\ (0, X, C) &\text 3 \leq H^\prime \leq 4 \\ (X, 0, C) &\text 4 \leq H^\prime \leq 5 \\ (C, 0, X) &\text 5 \leq H^\prime < 6 \end Overlap (when H^\prime is an integer) occurs because two ways to calculate the value are equivalent: X = 0 or X = C, as appropriate. Then we can find ''R'', ''G'', and ''B'' by adding the same amount to each component, to match luma: : m = Y^\prime_ - (0.30R_1 + 0.59G_1 + 0.11B_1) : (R, G, B) = (R_1 + m, G_1 + m, B_1 + m)


Interconversion


HSV to HSL

Given a color with hue H_V \in ^\circ,360^\circ/math>, saturation S_V \in ,1/math>, and value V \in ,1/math>, : H_L = H_V : L = V\left(1 - \frac\right) : S_L = \begin 0 & \text L=0 \text L=1 \\ \frac & \text \\ \end


HSL to HSV

Given a color with hue H_L \in ^\circ,360^\circ/math>, saturation S_L \in ,1/math>, and luminance L \in ,1/math>, : H_V = H_L : V = L+S_L\min(L,1-L) : S_V = \begin 0 & \text V=0 \\ 2\left(1-\frac\right) & \text \\ \end


From RGB

This is a reiteration of the previous conversion. Value must be in range R, G, B \in ,1/math>. With maximum component (i. e. value) : X_ := \max(R, G, B) =: V and minimum component : X_ := \min(R, G, B) = V-C, range (i. e. chroma) : C := X_ - X_ = 2(V-L) and mid-range (i. e. lightness) : L := \operatorname(R, G, B) = \frac = V-\frac, we get common hue: : H := \begin 0, & \text C = 0 \\ 60^\circ \cdot \left( 0 + \frac \right), & \text V = R \\ 60^\circ \cdot \left( 2 + \frac \right), & \text V = G \\ 60^\circ \cdot \left( 4 + \frac \right), & \text V = B \end and distinct saturations: : S_V := \begin 0, &\text V=0\\ \frac, & \end : S_L := \begin 0, &\textL=0\textL=1\\ \frac =\frac =\frac, & \text \end


Swatches

Mouse over the Palette (computing), swatches below to see the ''R'', ''G'', and ''B'' values for each swatch in a tooltip.


HSL


HSV


See also

* TSL color space


Notes


References


Bibliography

* Agoston's book contains a description of HSV and HSL, and algorithms in
pseudocode In computer science, pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine re ...
for converting to each from RGB, and back again. * This computer vision literature review briefly summarizes research in color image segmentation, including that using HSV and HSI representations. * This book doesn't discuss HSL or HSV specifically, but is one of the most readable and precise resources about current color science. * The standard computer graphics textbook of the 1990s, this tome has a chapter full of algorithms for converting between color models, in C. * * * Joblove and Greenberg's paper was the first describing the HSL model, which it compares to HSV. * This book only briefly mentions HSL and HSV, but is a comprehensive description of color order systems through history. * 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. * . Especially the sections abou
"Modern Color Models"
an

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. * 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. * * This is the original paper describing the "hexcone" model, HSV. Smith was a researcher at NYIT's Computer Graphics Lab. He describes HSV's use in an early
digital painting Digital painting is an established art medium that typically combines a computer, a graphics tablet, and software of choice. The artist uses painting and drawing with the stylus that comes with the graphics tablet to create 2D paintings wit ...
program.


External links


Demonstrative color conversion applet

HSV Colors
by Hector Zenil, The Wolfram Demonstrations Project.
HSV to RGB
by CodeBeautify. {{DEFAULTSORT:Hsl And Hsv Color space