Safekipedia

Web colors

Adapted from Wikipedia ยท Adventurer experience

A diagram showing how different HTML web colors are related to each other.

Web colors are special colors used to show pictures and text on websites. They help make the internet look bright and clear.

Computers mix three main colors to make all others: red, green, and blue. By changing how bright or dim each of these colors is, we can create millions of different shades. This gives websites many colors to choose from.

Early web browsers like Mosaic and Netscape Navigator used a list of color names. Today, web colors follow a standard called sRGB. This helps colors look similar on most screens. Modern ways also give designers even more color choices.

Hex triplet

A hex triplet is a special six-digit (or eight-digit) number used to show colors on websites and in computer programs. It stands for the red, green, and blue parts of a color. Each part can range from 0 to 255, which is shown as a two-digit number in a special counting system called hexadecimal.

For example, a brown color might have red=123, green=58, and blue=30. In hexadecimal, these become 7B, 3A, and 1E. Putting them together gives the hex triplet 7B3A1E.

Sometimes, a shorter three-digit form is used, like 09C, which expands to 0099CC. This shorter way only gives 4,096 colors instead of the 16,777,216 colors possible with the full six-digit form.

HTML color names

HTML and XHTML let you use colors for text, backgrounds, and other things. There are two types of color names: basic and extended.

The basic colors are 16 colors set by the HTML 4.01 rules. These colors work well on most computers.

Extended colors come from mixing rules from HTML, CSS, and SVG. Many web browsers understand these colors. Some of these colors have different names but look the same, like "aqua" and "cyan," or "fuchsia" and "magenta."

HTML nameR G B
HexDecimal
Pink colors
MediumVioletRedC71585199, 21, 133
DeepPinkFF1493255, 20, 147
PaleVioletRedDB7093219, 112, 147
HotPinkFF69B4255, 105, 180
LightPinkFFB6C1255, 182, 193
PinkFFC0CB255, 192, 203
Red colors
DarkRed8B0000139, 0, 0
RedFF0000255, 0, 0
FirebrickB22222178, 34, 34
CrimsonDC143C220, 20, 60
IndianRedCD5C5C205, 92, 92
LightCoralF08080240, 128, 128
SalmonFA8072250, 128, 114
DarkSalmonE9967A233, 150, 122
LightSalmonFFA07A255, 160, 122
Orange colors
OrangeRedFF4500255, 69, 0
TomatoFF6347255, 99, 71
DarkOrangeFF8C00255, 140, 0
CoralFF7F50255, 127, 80
OrangeFFA500255, 165, 0
Yellow colors
DarkKhakiBDB76B189, 183, 107
GoldFFD700255, 215, 0
KhakiF0E68C240, 230, 140
PeachPuffFFDAB9255, 218, 185
YellowFFFF00255, 255, 0
PaleGoldenrodEEE8AA238, 232, 170
MoccasinFFE4B5255, 228, 181
PapayaWhipFFEFD5255, 239, 213
LightGoldenrodYellowFAFAD2250, 250, 210
LemonChiffonFFFACD255, 250, 205
LightYellowFFFFE0255, 255, 224
Brown colors
Maroon800000128, 0, 0
BrownA52A2A165, 42, 42
SaddleBrown8B4513139, 69, 19
SiennaA0522D160, 82, 45
ChocolateD2691E210, 105, 30
DarkGoldenrodB8860B184, 134, 11
PeruCD853F205, 133, 63
RosyBrownBC8F8F188, 143, 143
GoldenrodDAA520218, 165, 32
SandyBrownF4A460244, 164, 96
TanD2B48C210, 180, 140
BurlywoodDEB887222, 184, 135
WheatF5DEB3245, 222, 179
NavajoWhiteFFDEAD255, 222, 173
BisqueFFE4C4255, 228, 196
BlanchedAlmondFFEBCD255, 235, 205
CornsilkFFF8DC255, 248, 220
HTML nameR G B
HexDecimal
Purple, violet, and magenta colors
Indigo4B008275, 0, 130
Purple800080128, 0, 128
DarkMagenta8B008B139, 0, 139
DarkViolet9400D3148, 0, 211
DarkSlateBlue483D8B72, 61, 139
BlueViolet8A2BE2138, 43, 226
DarkOrchid9932CC153, 50, 204
FuchsiaFF00FF255, 0, 255
MagentaFF00FF255, 0, 255
SlateBlue6A5ACD106, 90, 205
MediumSlateBlue7B68EE123, 104, 238
MediumOrchidBA55D3186, 85, 211
MediumPurple9370DB147, 112, 219
OrchidDA70D6218, 112, 214
VioletEE82EE238, 130, 238
PlumDDA0DD221, 160, 221
ThistleD8BFD8216, 191, 216
LavenderE6E6FA230, 230, 250
Blue colors
MidnightBlue19197025, 25, 112
Navy0000800, 0, 128
DarkBlue00008B0, 0, 139
MediumBlue0000CD0, 0, 205
Blue0000FF0, 0, 255
RoyalBlue4169E165, 105, 225
SteelBlue4682B470, 130, 180
DodgerBlue1E90FF30, 144, 255
DeepSkyBlue00BFFF0, 191, 255
CornflowerBlue6495ED100, 149, 237
SkyBlue87CEEB135, 206, 235
LightSkyBlue87CEFA135, 206, 250
LightSteelBlueB0C4DE176, 196, 222
LightBlueADD8E6173, 216, 230
PowderBlueB0E0E6176, 224, 230
Cyan colors
Teal0080800, 128, 128
DarkCyan008B8B0, 139, 139
LightSeaGreen20B2AA32, 178, 170
CadetBlue5F9EA095, 158, 160
DarkTurquoise00CED10, 206, 209
MediumTurquoise48D1CC72, 209, 204
Turquoise40E0D064, 224, 208
Aqua00FFFF0, 255, 255
Cyan00FFFF0, 255, 255
Aquamarine7FFFD4127, 255, 212
PaleTurquoiseAFEEEE175, 238, 238
LightCyanE0FFFF224, 255, 255
HTML nameR G B
HexDecimal
Green colors
DarkGreen0064000, 100, 0
Green0080000, 128, 0
DarkOliveGreen556B2F85, 107, 47
ForestGreen228B2234, 139, 34
SeaGreen2E8B5746, 139, 87
Olive808000128, 128, 0
OliveDrab6B8E23107, 142, 35
MediumSeaGreen3CB37160, 179, 113
LimeGreen32CD3250, 205, 50
Lime00FF000, 255, 0
SpringGreen00FF7F0, 255, 127
MediumSpringGreen00FA9A0, 250, 154
DarkSeaGreen8FBC8F143, 188, 143
MediumAquamarine66CDAA102, 205, 170
YellowGreen9ACD32154, 205, 50
LawnGreen7CFC00124, 252, 0
Chartreuse7FFF00127, 255, 0
LightGreen90EE90144, 238, 144
GreenYellowADFF2F173, 255, 47
PaleGreen98FB98152, 251, 152
White colors
MistyRoseFFE4E1255, 228, 225
AntiqueWhiteFAEBD7250, 235, 215
LinenFAF0E6250, 240, 230
BeigeF5F5DC245, 245, 220
WhiteSmokeF5F5F5245, 245, 245
LavenderBlushFFF0F5255, 240, 245
OldLaceFDF5E6253, 245, 230
AliceBlueF0F8FF240, 248, 255
SeashellFFF5EE255, 245, 238
GhostWhiteF8F8FF248, 248, 255
HoneydewF0FFF0240, 255, 240
FloralWhiteFFFAF0255, 250, 240
AzureF0FFFF240, 255, 255
MintCreamF5FFFA245, 255, 250
SnowFFFAFA255, 250, 250
IvoryFFFFF0255, 255, 240
WhiteFFFFFF255, 255, 255
Gray and black colors
Black0000000, 0, 0
DarkSlateGray2F4F4F47, 79, 79
DimGray696969105, 105, 105
SlateGray708090112, 128, 144
Gray808080128, 128, 128
LightSlateGray778899119, 136, 153
DarkGrayA9A9A9169, 169, 169
SilverC0C0C0192, 192, 192
LightGrayD3D3D3211, 211, 211
GainsboroDCDCDC220, 220, 220

CSS colors

The Cascading Style Sheets rules define colors that can be used on web pages. There are 16 basic color names that have been used since the early web. Later versions of CSS, like CSS3, added new ways to describe colors. You can now use colors described with numbers, such as a code that starts with a # symbol. There are also ways to describe colors using models like HSL, which stands for Hue, Saturation, and Lightness.

Example system color keywords
Keyword
linkText
visitedText
activeText
highlight
mark

Web-safe colors

In the mid-1990s, many computer screens could only show 256 colors. When a color needed for a picture wasn't available, the computer had to pick a close color.

To help with this, a group of 216 colors was created. This number was chosen because it left space for computer systems to use other colors, and it allowed six shades of red, green, and blue. These colors were picked because they worked well with early web browsers.

Even though these "web-safe" colors were meant to show clearly, they sometimes still had to mix colors on certain computers. As better screens with more colors became common in the 2000s, the idea of web-safe colors was used less.

Each of these colors can be described using numbers for red, green, and blue. These numbers help computers know exactly which color to show.

The list of web-safe colors includes some that are easier to see clearly on old screens. These are called the "really safe palette."

6 shades of each color
KeyHexDecimalFraction
00000
333510.2
6661020.4
9991530.6
C (12)CC2040.8
F (15)FF2551
Safest web colors
R--
-GB
036CF
00*000**F00*
03*003**F03*
06
09
0C
0F*00F**F0F*
โ‹ฎโ‹ฎ
F0*0F0**6F0**FF0*
F3*3F3**6F3**FF3*
F6*0F6**3F6**CF6**FF6*
F9
FC*0FC**3FC*
FF*0FF**3FF**6FF**FFF*

Accessibility

Some browsers and devices cannot show colors. For people who cannot see colors or for those who are colorblind, websites that only use colors can be hard or impossible to use.

To help everyone, it is best to either not use colors at all or to choose colors carefully. This means picking colors for both the background and all text and links so that they are easy to see.

The Web Content Accessibility Guidelines suggest that text should stand out clearly from the background. For normal-sized text, the difference should be at least 4.5 times brighter or darker than the background. For larger text, the difference should be at least 3 times.

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Web colors, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.