Wikipedia:WikiProject Color/Normalized Color Coordinates
| Sample color Information Box | |
|---|---|
| Hex triplet | #FFA500 |
| sRGBB (r, g, b) | (255, 165, 0) |
| HSV (h, s, v) | (39°, 100%, 100%) |
| CIELChuv (L, C, h) | (75, 105, 45°) |
| Source | Sample source |
| B: Normalized to [0–255] (byte) H: Normalized to [0–100] (hundred) | |
Wikipedia uses a standardized set of color coordinate systems in color infobox (sample shown) and also in articles such as List of colors. Color coordinate ranges are a matter of choice and there is no universal standard range for many color spaces (though some ranges may be prevalent). A box having all of the different possible coordinate ranges would be impractical. Therefore, Wikipedia has chosen standard ranges for the coordinate systems, so as to have consistent coordinates in all color articles. This article describes the chosen systems and provides instructions for conversion to other ranges which might be needed by particular color environments.
Recommended color systems
[edit]sRGB
[edit]sRGB has been the standard version of RGB for the web since 1996. As an RGB system, it describes the amounts of red, green, and blue light which are added together in order to create a particular color. Every color infobox on Wikipedia must have one such parameter to, at the very least, show on the screen an idea of what the color looks like.
In the infobox, the coordinates are presented as three numbers separated by commas, as in this example for the color orange:
- (255, 165, 0)
The coordinates within the parenthesis provide, in order, the relative values of red, green, and blue light. The number in each position ranges from 0 (no color added) to 255 (100% color added). This range was chosen because it is the most commonly used in computer color selection dialogs. (The numbers 0 through 255 fit naturally within one byte and are therefore used to directly drive graphics cards.)
Most image editing programs accept this range. Therefore, RGB should be entered into image editing programs wherever possible because it rarely (if ever) requires conversion.
It is assumed that the exact meaning of the primary colors ("red" for example) is that of the sRGB standard, and that the sRGB gamma function is in use. This color space is not linear. Middle-grey sRGB values (with „middle“ defined as „emitting half as much visible light per area as a maximum brightness white“ and „grey“ defined as „having the same chromacity as the standard illuminant D65“) are near 188,188,188, assuming the γ (gamma) correction formula from the sRGB standard is in use.
Hex triplet
[edit]This is a compact representation of sRGB, using hexadecimal numbering. The hex triplet is based upon the standard format for representing colors within HTML, which is used to construct webpages. This coordinate system should not require any conversion; it should be able to be used directly in HTML source as, for example, in this style attribute:
style="background-color:#FFA500;"
Gamut mapping
[edit]Created to describe a typical 1990s CRT screen, sRGB has a limited gamut and is unable to describe every real color. As Wikipedia templates take a hex triplet as input, all colors must have a value in the sRGB range. Fitting a color into the range is known as gamut mapping. The current practice is to use an scRGB interpretation scaled to 0-255.
CIELChuv coordinates
[edit]CIELChuv is a perceptually uniform color space consisting of lightness, chroma and hue coordinates. It is derived from the CIELUV space, usually based on the 2° observer and the standard Illuminant D65 representing daylight.
huv is an angle that is normally given in degrees. L* is in the range 0 to +100. C*uv describes the colorfulness and can range from 0 to a couple hundreds.
Colors out of the sRGB gamut should specify a CIELChuv value. A CIELChuv value is enough to describe any color possible under daylight. Sources may specify colors in some other uniform color space, which can be converted to CIELChuv using established algorithms such as those provided by the python package "colour".
255(255)-123+0=65,710.00000=66%[.66 ]
Systems that should not be used
[edit]Microsoft HSL inputs
[edit]Many Microsoft Windows programs (such as Microsoft Paint) provide inputs to accept HSL (hue, saturation, lightness) color coordinates in the range 0–240, 0–240, 0–240.[1] These values are only a computer workaround and should never be used in the context of Wikipedia. Most (if not all) of these programs also accept RGB, which can typically be entered without conversion. Therefore, it is usually best in these programs to use the RGB coordinate.
If a source truly only provides a Microsoft HSL input and if you cannot find an alternate, convert it to sRGB. First multiply hue by , and divide lightness and saturation by 2.4 to obtain normal HSL values. Then use any online tool (such as [1]) to convert HSL to sRGB.
See also
[edit]- ^ Chen, Raymond (13 October 2015). "Why do Saturation and Luminance go all the way to 240, but Hue goes only to 239? And why 239 anyway?". The Old New Thing.