| advertise add site services publishers database health videos | ![]() | about toolbar stats live show health store more stuff JOIN/LOGIN |
Herpes Rapid test, HSV 2, Biokit HSV-2 instant herpes testing cliawaived.com | The HerpeSelect (R)' Test for HSV-1 and HSV-2... mylabisquest.com | The HerpeSelect (R)' Test for HSV-1 and HSV-2... questdiagnostics.com | Virus, Cure herpes simplex virus, HSV-1, HSV-2 etc... fixdisease.com |
HSL and HSV are two related representations of points in an RGB color model that attempt to describe perceptual color relationships more accurately than RGB, while remaining computationally simple. HSL stands for hue, saturation and lightness, while HSV stands for hue, saturation and value. HSI and HSB are alternative names for these concepts, often substituting intensity and brightness for lightness and/or value;[1][2][3][4] their definitions are less standardized, but they are typically interpreted to be synonymous with HSL and HSV. Both HSL and HSV can be thought of as describing colors as points in a cylinder (called a color solid) whose central axis ranges from black at the bottom to white at the top, with neutral colors between them. The angle around the axis corresponds to “hue”, the distance from the axis corresponds to “saturation”, and the distance along the axis corresponds to “lightness”, “value” or “brightness”. The two representations are similar in purpose, but differ somewhat in approach. Both are mathematically cylindrical, but while HSV (hue, saturation, value) can be thought of conceptually as an inverted cone of colors (with a black point at the bottom, and fully-saturated colors around a circle at the top), HSL conceptually represents a double-cone or sphere (with white at the top, black at the bottom, and the fully-saturated colors around the edge of a horizontal cross-section with middle gray at its center). 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 defined by (h, s, l) or (h, s, v) triplets depend on the colors of the red, green, and blue primaries of the device or of the particular RGB space, and on the gamma compression used to represent the amounts of those primaries. Each unique RGB device therefore has unique HSL and HSV spaces to accompany it, and an (h, s, l) or (h, s, v) triplet can therefore become definite when it is tied to a particular RGB color space (such as sRGB). Both models were first formally described in 1978 by Alvy Ray Smith, though the concept of describing colors in three dimensions dates to the 18th century (see section below).[5][6]
[edit] Usage
An HSV color wheel (left) allows the user to quickly select a multitude of colors. The conical representation (right) of the HSV model is well-suited to visualizing the entire HSV color space as a single object. Notice that the triangle in the left image corresponds to one face of the cone cross section in the right image. It is sometimes preferable in working with art materials, digitized images, or other media, to use the HSV or HSL color model over alternative models such as RGB or CMYK, because of differences in the ways the models emulate how humans perceive color. RGB and CMYK are additive and subtractive models, respectively, modelling the way that primary color lights or pigments (respectively) combine to form new colors when mixed. The HSV model is commonly used in computer graphics applications. In various application contexts, a user must choose a color to be applied to a particular graphical element. When used in this way, the HSV color wheel is often used. In it, the hue is represented by a circular region; a separate triangular region may be used to represent saturation and value. Typically, the vertical axis of the triangle indicates saturation, while the horizontal axis corresponds to value. In this way, a color can be chosen by first picking the hue from the circular region, then selecting the desired saturation and value from the triangular region. Another visualization method of the HSV model is the cone. In this representation, the hue is depicted as a three-dimensional conical formation of the color wheel. The saturation is represented by the distance from the center of a circular cross-section of the cone, and the value is the distance from the pointed end of the cone. Some representations use a hexagonal cone, or hexcone, instead of a circular cone. This method is well-suited to visualizing the entire HSV color space in a single object; however, due to its three-dimensional nature, it is not well-suited to color selection in two-dimensional computer interfaces. The HSV color space could also be visualized as a cylindrical object; similar to the cone above, the hue varies along the outer circumference of a cylinder, with saturation again varying with distance from the center of a circular cross-section. Value again varies from top to bottom. Such a representation might be considered the most mathematically accurate model of the HSV color space; however, in practice the number of visually distinct saturation levels and hues decreases as the value approaches black. Additionally, computers typically store RGB values with a limited range of precision; the constraints of precision, coupled with the limitations of human color perception, make the cone visualization more practical in most cases. [edit] Comparison of HSL and HSVHSL is similar to HSV. For some people, HSL better reflects the intuitive notion of "saturation" and "lightness" as two independent parameters, but for others its definition of saturation is wrong, as for example a very pastel, almost white color can be defined as fully saturated in HSL. It might be controversial, though, whether HSV or HSL is more suitable for use in human user interfaces. The CSS3 specification from the W3C states, "Advantages of HSL are that it is symmetrical to lightness and darkness (which is not the case with HSV for example)…" This means that:
[edit] Comparison with other color models
The HSV tristimulus space does not technically support a one-to-one mapping to physical power spectra as measured in radiometry. Thus it is not generally advisable to try to make direct comparisons between HSV coordinates and physical light properties such as wavelength or amplitude. [edit] Comparison with color scienceThe terms attributed to the "L" and "V" components of the HSL and HSV color models may be misleading since they have little to do with color science definitions of the terms. In photometry, concepts such as lightness and luminance relate to a weighted spectrum, in which green is much more luminous than blue, and red is between; but in HSL and HSV, the "L" and "V" dimensions treat the three color channels equally.
[edit] Spherical and other 3D mappingsHSL and HSV are related to older, three-dimensional color-order systems such as Philipp Otto Runge's color sphere (Farbenkugel) and the Munsell color system, both of which are structured around a neutral black-to-white axis, with lightness extending along the polar axis, hue represented by longitude, and saturation a fraction of the radius of the disk at a constant lightness or latitude. Munsell refers to the colorfulness dimension as chroma rather than saturation, but uses hue and lightness in the same way as HSL. Modern works also sometimes use this spherical model.[9][10] Since the entire top and bottom surfaces of the HSL cylinder are white and black, respectively, no information is lost when collapsing them to points at the sphere's poles. The same is true for the HSL bi-cone, another popular way to shrink the white and black surfaces to points.[11][12] The bi-cone fits the same description as the sphere given above, but with a different profile of radius versus lightness. For HSV, on the other hand, the top surface of the cylinder is not white, so only the bottom surface can be collapsed to a point, resulting in the popular mapping to a cone. [edit] Formal specifications
HSL and HSV are defined mathematically by transformations between the r, g, and b color coordinates in the RGB model and the h, s, l, and v coordinates in the HSL and HSV models.[13] [edit] Conversion from RGB to HSL overviewThe logic of the conversion is as follows: Lightness: In RGB, the closer we are to the MAX RGB value for each r, g , b the closer we are getting to white, and thus the closer we are getting to full brightness. So lightness is dependent on how close our average RGB values are to white. Saturation: There are two factors that determine the "strength" of the saturation. The first is the distances between the different RGB values. The closer they are together, the more the RGB values neutralize each other, and the less the hue is emphasized, thus lowering the saturation. (R = G = B means no saturation at all.) The second factor is the distance the RGB values are from the midpoint. This is because the closer they are to 0, the darker they are until they are totally black (and thus no saturation); and, the closer they get to MAX value, the brighter they are until totally white (and once again no saturation). Hue: The logic here is to map the RGB values to different hues on a circle circumference. [edit] Conversion from RGB to HSL or HSVLet r, g, b ∈ [0,1] be the red, green, and blue coordinates, respectively, of a color in RGB space. Let max be the greatest of r, g, and b, and min the least. To find the hue angle h ∈ [0, 360] for either HSL or HSV space, compute: To find saturation and lightness s, l ∈ [0,1] for HSL space, compute: The value of h is generally normalized to lie between 0 and 360°, and h = 0 is used when max = min (that is, for grays) though the hue has no geometric meaning there, where the saturation s = 0. Similarly, the choice of 0 as the value for s when l is equal to 0 or 1 is arbitrary. HSL and HSV have the same definition of hue, but the other components differ. The values for s and v of an HSV color are defined as follows: The range of HSV and HSL vectors is a cube in the cartesian coordinate system; but since hue is really a cyclic property, it is not so necessary or appropriate to unwrap it, with a cut at 0 (red), into a linear coordinate. Therefore, visualizations of these spaces usually involve hue circles;[14] cylindrical and conical (bi-conical for HSL) depictions are most popular; spherical depictions and other color solids are also possible. [edit] Conversion from HSL to RGBGiven a color defined by (h, s, l) values in HSL space, with h in the semi-open interval [0, 360), indicating the angle, in degrees of the hue, and with s and l in the range [0, 1], representing the saturation and lightness, respectively, a corresponding (r, g, b) triplet in RGB space, with r, g, and b also in range [0, 1], and corresponding to red, green, and blue, respectively, can be computed as follows: First, if s = 0, then the resulting color is achromatic, or gray. In this special case, r, g, and b all equal l. Note that the value of h is ignored, and may be undefined in this situation. The following procedure can be used, even when s is zero:
The above operation is a modulo, so it can be simply expressed as : Compute each color component ColorC of the vector (ColorR, ColorG, ColorB) = (r, g, b), [edit] Conversion from HSV to RGBSimilarly, given a color defined by (h, s, v) values in HSV space, with h as above, and with s and v varying between 0 and 1, representing the saturation and value, respectively, a corresponding (r, g, b) triplet in RGB space can be computed: Compute color vector (r, g, b), [edit] ExamplesThe R, G, B, S and L values shown below are in the range of 0.0 to 1.0. The H values are in the range of 0° to 360°.
[edit] Software support The GIMP supports several methods of picking colors within the HSV color model, including the color wheel and a colored square with a hue slider. In software, a hue-based color model (HSV or HSL) is usually presented to the user in the form of a linear or circular hue chooser and a two-dimensional area (usually a square or a triangle) where the user can choose saturation and value/lightness for the selected hue. With this representation, the difference between HSV and HSL is irrelevant. However, many programs also let the user select a color via linear sliders or numeric entry fields, and for those controls, usually either HSL or HSV (not both) are used. HSV is traditionally more common. Here are some examples: Applications that support HSV for color selection:
Applications that support HSL for color selection:
Applications that support both HSV and HSL for color selection:
Applications that support HSV for color selection and HSL for image color adjustment:
[edit] References
[edit] See also[edit] External links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ↑ top of page ↑ | about thumbshots |