Pipette

Shades of Gray

In this article we would like to attend to the topic "grey values". For this purpose, we will first look at what characteristics and what form gray values have in the various common color models. We then contrast a series of different gray values from black to white in a table, where the gray values are graded in always the same steps from color to color. This table makes it easy to understand the explanations introduced in the sections regarding the color models. Finally, we will look at common terms used for the different shades of gray in different contexts.

This article is divided into the following sections:

Gray Values in the RGB Color Model

Within the RGB color model, when the proportions of red (R), green (G) and blue (B) are identical, always a gray value is the result. If each of these proportions is 0, the result is black (in hexadecimal notation #000 or #000000). On the other hand, if all shares are at 100 percent, the result is white (in hexadecimal notation #FFF or #FFFFFF respectively 255 in decimal notation). In between, there are all other gray values accordingly graded.

Gray Values in the CMY Color Model

The CMY color model behaves similar to the RGB color model. Here, too, a gray value arises with exactly the same proportions of the components cyan (C), magenta (M) and yellow (Y). Also in this model, the brightness value respectively gray value can be regulated by constantly varying these three values.

However, in the subtractive CMY color model, the direction is the opposite to the additive RGB color model: While in the CMY color model, for the color black, all components must be 100 percent and 0 percent for the color white, in the RGB color model it is exactly the other way around. In the RGB color model, white results when all components are at 100 percent and black when each of the 3 components is at 0 percent.

Gray Values in the CMYK Color Model

A grayscale value is obtained in the CMYK model by keeping the values for cyan (C), magenta (M) and yellow (Y) arbitrarily constant and regulating the gray value via the proportion of K (Key, Black). In this process, K can adopt values from 0 to 100 percent. Since "K" stands for the proportion of black, in the CMYK color model, assuming that cyan, magenta and yellow are at 0 percent, we automatically get pure black with a K value of 100 percent and the color white if we set the K value to 0 percent.

However, if we set the values of cyan, magenta and yellow to 100 percent, because of the subtractive color mixture, it behaves exactly the other way around: In this case we get a pure black with a K value of 0 percent and a pure white with a K value of value of 100 percent. If cyan, magenta and yellow have an identical value, which is between 0 and 100 percent, we still get gray values and a pure black by varying the K value, but no longer pure white. The higher the identical values of cyan, magenta and yellow, the darker the gray value starts at a K value of 0 percent. If cyan, magenta and yellow are even at 100 percent, we always get black, regardless of what percentage the K value is at.

Gray Values in the HSV Color Model

In the HSV color model, a gray value results from a saturation (S) of 0 percent. With this, the selected hue (H) no longer plays a role and the lightness (V, Value) determines where the gray is located between white and black.

This means that with a saturation of 0 percent, we can regulate the gray value solely through the lightness. With a brightness of 0 percent we get black, with a brightness of 100 percent we get white, in between there are the gray values. In this process, the hue can take any value without changing the result, since it is completely turned off by the saturation of 0 percent. However, typically, one does not use an arbitrary H value for black, white and gray values, but a value of 0 percent, as this best reflects the insignificance of this value.

Gray Values ​​in the XYZ / CIE Norm Valence System

The XYZ color model respectively the CIE standard color system developed by the International Commission on Illumination, behaves completely different from the color models presented so far. This model attempts to take human perception into account and to represent all possible colors (which the other models cannot).

To achieve this, this system defines different observers and lighting conditions in order to accommodate as many situations as possible. Depending on which lighting you choose, the values ​​resulting from the conversion from other color models will vary accordingly.

One of the most common and frequently used types of lighting is the CIE standard lighting D65 (medium daylight), which is also used for sRGB, Adobe RGB and the PAL/SECAM TV standard, for example. Under this lighting condition, the RGB white is at X = 95.047; Y = 100.000 and Z = 108.883, while the RGB black is at X = 0; Y = 0 and Z = 0. The gray shades ​​in between increase in the same ratio among themselves, but unlike all other color models presented so far, such as RGB, CMY, CMYK or HSV, they do not follow an exact linear gradation. For example, although the 50% RGB gray is exactly halfway up the scale in all other systems, in the XYZ system under D65 conditions it is at X = 20.518; Y = 21.586 and Z = 23.507 only at about 20% of the scale. The reason for this is that the colors in the XYZ color space are not evenly distributed. If you use other lighting conditions, the RGB black remains at 0 while only the maximum of the scale (where the RGB white lies) changes.

When using the standardized xyz variant Yxy (also known as xyY) under the condition of medium daylight (CIE standard illumination D65), the color white respectively the white point is in the middle of the CIE xy color space (in the middle of the standard color chart) at the position with the coordinates x = 0.313 and y = 0.328 with a brightness of Y = 100%. All gray values ​​including black are also at this point, but with a brightness value Y of 0% (black) through the corresponding shades of gray to 100% (white). If we choose a different type of lighting, the white point would shift to a different location. For example, the white point of the CIE standard illumination D55 (direct sunlight) is at x = 0.3324 and 0.3474, while the CIE standard illumination E (white point of the point with the same energy) is exactly one third for both values.

Gray Values ​​in the TColor System

The TColor value, which is based on the RGB color model, calculates the RGB components of red, green and blue into just one single number (more on the formula for the calculation in the linked article). This makes the TColor system the only one of all the color models presented here that only needs a single value to fully describe a color.

With this calculation, black results in a TColor value of 0, white results in the value 16777215. In between, always at the same distance of 65793, there are the 254 different integer gray levels from the RGB model (256 greyscale levels from black to gray to white). Every 65793rd TColor value is therefore a gray value. The number 65793 results from the complete run through two color channels (256 x 256 = 65536 colors) plus 256 + 1 colors of the third color channel.

Color Chart with Gray Values

To demonstrate these peculiarities of the different color models, the following table contains some shades of gray between black (top) and white (bottom) as well as their values in the different color models. Below the table you will find an explanation of the individual columns.

 HEX%RGBCMYCMYKHSVXYZXYZXYZTColor
 #0000000,000100,0100,00,000,000,000,000
 #0505051,96598,098,01,960,140,150,17328965
 #0A0A0A3,921096,196,13,920,290,300,33657930
 #0F0F0F5,881594,194,15,880,450,480,52986895
 #1414147,842092,292,27,840,670,700,761315860
 #1919199,802590,290,29,800,920,971,061644825
 #1E1E1E11,763088,288,211,81,231,301,411973790
 #23232313,733586,386,313,71,601,681,832302755
 #28282815,694084,384,315,72,022,122,312631720
 #2D2D2D17,654582,482,417,62,492,622,862960685
 #32323219,615080,480,419,63,033,193,473289650
 #37373721,575578,478,421,63,633,824,163618615
 #3C3C3C23,536076,576,523,54,294,524,923947580
 #41414125,496574,574,525,55,025,295,764276545
 #46464627,457072,572,527,55,826,126,674605510
 #4B4B4B29,417570,670,629,46,697,047,664934475
 #50505031,378068,668,631,47,628,028,745263440
 #55555533,338566,766,733,38,639,089,895592405
 #5A5A5A35,299064,764,735,39,7210,211,15921370
 #5F5F5F37,259562,762,737,310,911,412,56250335
 #64646439,2210060,860,839,212,112,713,96579300
 #69696941,1810558,858,841,213,414,115,46908265
 #6E6E6E43,1411056,956,943,114,815,617,07237230
 #73737345,1011554,954,945,116,317,118,77566195
 #78787847,0612052,952,947,117,918,820,57895160
 #7D7D7D49,0212551,051,049,019,520,522,38224125
 #82828250,9813049,049,051,021,222,324,38553090
 #87878752,9413547,147,152,923,024,226,48882055
 #8C8C8C54,9014045,145,154,924,926,228,69211020
 #91919156,8614543,143,156,926,928,330,89539985
 #96969658,8215041,241,258,829,030,533,29868950
 #9B9B9B60,7815539,239,260,831,232,835,710197915
 #A0A0A062,7516037,337,362,733,435,238,310526880
 #A5A5A564,7116535,335,364,735,837,641,010855845
 #AAAAAA66,6717033,333,366,738,240,243,811184810
 #AFAFAF68,6317531,431,468,640,742,946,711513775
 #B4B4B470,5918029,429,470,643,445,649,711842740
 #B9B9B972,5518527,527,572,546,148,552,812171705
 #BEBEBE74,5119025,525,574,548,951,556,112500670
 #C3C3C376,4719523,523,576,551,954,659,412829635
 #C8C8C878,4320021,621,678,454,957,862,913158600
 #CDCDCD80,3920519,619,680,458,061,066,513487565
 #D2D2D282,3521017,617,682,461,364,470,213816530
 #D7D7D784,3121515,715,784,364,668,074,014145495
 #DCDCDC86,2722013,713,786,368,071,677,914474460
 #E1E1E188,2422511,811,888,271,675,382,014803425
 #E6E6E690,202309,809,8090,275,279,186,215132390
 #EBEBEB92,162357,847,8492,279,083,190,515461355
 #F0F0F094,122405,885,8894,182,887,194,915790320
 #F5F5F596,082453,923,9296,186,891,399,416119285
 #FAFAFA98,042501,961,9698,090,995,6104,016448250
 #FFFFFF100,002550,000,00100,095,0100,0109,016777215

In the first column of the table you can see a small square with the gray tone of the respective table row. This is followed by the individual values ​​of the various color models presented:

If you would like to have other gray levels or more accurate values or you want to work with this colors, you can simply use the program pipette. Just pick up the colors from your browser window with the pipette function so that you do not have to enter them manually. The Pipette can also be used to understand the effect of varying each component of the different color models on the degree of darkness or brightness by gradually increasing or decreasing the proportions of each component in the program.

The table was generated automatically by an individual software solution by Stefan Trost Media.

Names for specific Gray Values

Some of the gray values ​​presented can be described not only by their numerical value in one of the different color models, as we saw in the last section, but also by their own names, which however may differ depending on the context.

The following table compares some of these terms from different contexts. Most of these color names and color constants come from the X11 / SVG / CSS3 color module, which can also be used for coloring web pages, others from programming languages ​​such as Java, Pascal (Delphi and Lararus) or VBA (Visual Basic for Applications), from the application framework and GUI toolkit Qt, as well as from the text and document markup language LaTeX and the standard PWG 5101.1 (Media Color Names) developed by the Printer Working Group (PWG).

The first four columns contain a color field for the respective gray value, the hexadecimal color code and the rounded percentage of all color channels from the RGB color model. This is followed by the individual names from the respective contexts. If a context does not provide its own name for one of the listed color values, the corresponding field is marked with a dash.

 HEX%NameX11 / CSSJavaPascalQtVBALaTeXPWG
 #0000000BlackBlackBLACKclBlackblackvbBlackblackBlack
 #40404025Dark Gray-DARK_GRAYclDkGray--darkgrayDark Gray
 #69696941Cloudy Gray DimGray------
 #80808050GrayGray [CSS]GRAYclGraydarkGray-grayGray
 #A0A0A063Medium Gray--clMedGraygray---
 #A9A9A966Dark GrayDarkGray------
 #AFAFAF69Dark Silver------Dark Silver
 #BEBEBE74Mid GrayGray [X11]------
 #BFBFBF75Light Gray-----lightgray-
 #C0C0C075SilverSilverLIGHT_GRAYclSilver/clLtGraylightGray--Silver
 #D3D3D383Light GrayLightGray-----Light Gray
 #DCDCDC86GainsboroGainsboro------
 #E0E0E087Pure Silver------Clear Silver
 #E1E1E188Light Silver------Light Silver
 #F5F5F596SmokeWhiteSmoke------
 #FFFFFF100WhiteWhiteWHITEclWhitewhitevbWhitewhiteWhite

Across all contexts, there is a consensus to use the terms "black" and "white" for the colors with the hexadecimal RGB color codes #000000 (color share of red, green and blue of 0%) respectively #FFFFFF (color share of red, green and blue of 100%). But also the term "gray" is used comparatively uniformly for an RGB share of 50% on all channels, which corresponds to the RGB color code #808080.

However, already the terms "light gray" and "dark gray" are much more ambiguous. While most contexts refer to the RGB color value #404040 as dark gray, Qt instead defines the color value #808080 as "dark gray", which is referred to as "gray" in most other contexts, while CSS even uses this term for the color value #A9A9A9, which is lighter than the normal 50% gray. Also the term "light gray" can mean a color from #BFBFBF to #D3D3D3, depending on the context. Here you can find out why the CSS standard defines DarkGray lighter than the normal Gray.

Other terms for shades of gray are - listed according to their brightness from black to white - the words "cloudy gray" for #696969, "medium gray" for #A0A0A0, "dark silver" for #AFAFAF, "light gray" for #BFBFBF, "silver" for #C0C0C0, "gainsboro" for #DCDCDC, "pure silver" for #E0E0E0, "light silver" for #E1E1E1 as well as "smoke" for #F5F5F5. However, most of these additional terms are only used in one or just a few contexts. The CSS standard and the Printer Working Group define most terms for the shades of gray.

The ambiguity of the gray value definitions exists not only between the different contexts but also within some definition spaces. For example, the gray value #C0C0C0 is referred twice by Pascal as both "silver" (clSilver) and "light gray" (clLtGray). The Media Color Names of the Printer Working Group (PWG) also contain several multiple definitions. This is due to the approach of this color scheme to define almost all color values ​​not only in their pure variant but also in the shades "dark", "light" and "clear". In the group of color-valueless gray values, this gradation leads to the fact that not only "Gray" is assigned the gray value #808080 but also "Clear Black" and "Light Black" embody the same gray value. The same applies to #C0C0C0 ("Silver" or "Clear Gray") and #FFFFFF ("White" or "Clear White").

Another form of double definition can be found in the CSS standard: CSS not only accepts the American writing "Gray" with "a" but also the English writing "Grey" with "e" instead. The words "Grey", "DimGrey", "DarkGrey" and "LightGrey" can therefore be used equivalently to "Gray", "DimGray", "DarkGray" and "LightGray", even though older browsers such as the Netscape Navigator still insisted on the "a" variant.

Another and yet different type of double definition concerns the color constants of Java: Normally, the Java programming language is case-sensitive. However, the color constants shown in the table can be written in lowercase as well as in the uppercase variant shown. This peculiarity arose because the first definition of these constants was in lowercase. However, since the Java convention recommends capitalized constants, a corresponding redefinition was made while at the same time retaining the already defined variants for compatibility reasons. Otherwise, the usual approach in the respective programming language or environment applies to the writing of the color constants and color names, for example that CSS, Pascal and VBA are case-insensitive and therefore allow all writings and consider them to be equivalent, while LaTex and normally also Java, for example, are case-sensitive and only accept the writings shown.

Other Color Charts

Lightness and Saturation | Lightness | Saturation | Shades of Grey | Color Names | Web Colors