Web color
Web colors are colors used in designing webpages, and the ways for describing and listing those colors.
There are several ways to choose colors for parts of webpages. Colors may be listed as an RGB triplet (a set of three numbers, red, green, and blue) in hexadecimal format (a hex triplet, rr, gg, bb). An RGB triplet can make 16,777,216 different colors. Standard colors can also be chosen by their common English names. Often a color tool or other graphics software is used to create color values.
The first versions of Mosaic and Netscape Navigator used the X11 color names as the base for their color lists. This was because they both started as X Window System applications.
Each web color has its own definition, sRGB. This relates to the chromaticities of a single phosphor set, a given transfer curve, adaptive whitepoint, and viewing conditions. These have been chosen to be similar to many real-world monitors and viewing conditions. Even without color management, the colors created are fairly close to the given values. However, user agents can be different in the fidelity with which they show the colors. Better user agents use color management to create better color fidelity. This is important for Web-to-print applications.[1]
Hex triplet
A hex triplet is a six-digit, three-byte number used in HTML, CSS, PHP, JS, SVG, and other computer programs, to represent colors. The bytes represent the red, green and blue parts of the color. One byte represents a number from 00 to FF or 0 to 255 in decimal notation. This represents the least (0) to the most (255) intensity of each color component. The hex triplet is formed by concatenating three bytes in hexadecimal notation, in the following order:
- Byte 1: red value (color type red)
- Byte 2: green value (color type green)
- Byte 3: blue value (color type blue)
For example, consider the color where the red/green/blue values are decimal numbers: red=36, green=104, blue=160 (a grayish-blue color). The decimal numbers 36, 104 and 160 are similar to the numbers 24, 68 and A0 respectively. The hex triplet is obtained by combining the 6 hexadecimal digits together, 2468A0 in this example.
HTML web colors
Formulated in 1997, there were originally 16 colors. Orange was added later to make a total of 17. The original 16 were part of something called the "Windows VGA template", meaning that they are the colors that can be used for actions like highlighting.[2]
Color[3] | Hexadecimal | Color | Hexadecimal | Color | Hexadecimal | Color | Hexadecimal |
---|---|---|---|---|---|---|---|
aqua | #00FFFF | gray | #808080 | navy | #000080 | silver | #C0C0C0 |
black | #000000 | green | #008000 | olive | #808000 | teal | #008080 |
blue | #0000FF | lime | #00FF00 | purple | #800080 | white | #FFFFFF |
fuchsia | #FF00FF | maroon | #800000 | red | #FF0000 | yellow | #FFFF00 |
List of HTML Color Names
The table below contains all 140 of the HTML colors. All modern browsers support them. [4]
style="background:#F08080;color:black"
style="background:red;color:white"
style="background:#EB6651;color:white"
style="background:#FF3333;color:white"
style="background:#E34234;color:white"
style="background:#FF5349;color:black"
style="background:#;color:black"
style="background:#;color:white"
style="background:#;color:white"
style="background:#;color:white"
style="background:;color:black"
Pale pink (Palepink) ||#FADADD||250 218 221
style="background:#FF7DB3;color:white"
style="background:#CB416B;color:white"
style="background:#;color:white"
style="background:#C66359;color:black"
style="background:#E9967A;color:black"
style="background:#;color:black"
style="background:coral;color:white"
style="background:#CD5B45;color:white"
style="background:#;color:white"
style="background:orangered;color:white"
style="background:papayawhip;color:black"
style="background:;color:white"
style="background:#;color:white"
style="background:#;color:white"
style="background:#;color:white"
style="background:#;color:white"
style="background:;color:white"
style="background:#;color:white"
style="background:;color:black"
style="background:#;color:white"
style="background:#FFEC8B;color:black"
style="background:#FFB90F;color:white"
style="background:goldenrod;color:white"
style="background:#;color:black"
style="background:#F1E5AC;color:black"
style="background:#FFBF00;color:black"
style="background:#FFC700;color:black"
style="background:;color:black"
style="background:;color:black"
style="background:;color:black"
style="background:#FFFFCC;color:black"
style="background:;color:black"
style="background:lightyellow;color:black"
style="background:#F6BE00;color:black"
style="background:;color:white"
style="background:#AB82FF;color:white"
style="background:#9370DB;color:white"
style="background:;color:white"
style="background:#;color:white"
style="background:;color:white"
style="background:purple;color:white"
style="background:;color:white"
style="background:#;color:white"
style="background:;color:white"
style="background:;color:white"
style="background:#C71585;color:white"
|
style="background:;color:white"
style="background:#;color:white"
style="background:#556B2F;color:white"
style="background:#;color:white"
style="background:#00C957;color:black"
style="background:#;color:black"
style="background:aquamarine;color:black"
style="background:;color:black"
style="background:;color:black"
style="background:turquoise;color:black"
style="background:;color:white"
style="background:#AFEEEE;color:black"
style="background:;color:white"
style="background:teal;color:white"
style="background:#;color:white"
style="background:#00A59C;color:white"
style="background:#;color:white"
style="background:;color:white"
style="background:;color:white"
style="background:;color:white"
style="background:;color:black"
style="background:#;color:black"
style="background:;color:white"
style="background:#6495ED;color:white"
style="background:navy;color:white"
|
style="background:#;color:black"
style="background:#;color:white"
style="background:#;color:white"
style="background:brown;color:white"
style="background:#5C4033;color:white"
style="background:#;color:white"
style="background:#;color:black"
style="background:#;color:white"
|
X11 colors (formulated in 1987)
These are called "X11 web colors" since the invention of the World Wide Web in 1991.
|
|
|
Chart of selected web colors
This chart shows selected HTML and X11 colors as well as selected unofficial consensus web colors developed by web designers since 2002. When entering code using the unofficial colors, the hex code of the color must be specified instead of writing the name of the color.
Web ColorHex Triplet Media
References
- ↑ "Web design details". www.purei.com. Retrieved 27 April 2016.
- ↑ Wium Lie, Håkon; Bos, Bert (1996-12-17). "Cascading Style Sheets, level 1; Section 6.3 Color units". World Wide Web Consortium. Archived from the original on 2024-08-13. Retrieved 2024-09-05.
- ↑ HTML 4.01 Specification section 6.5 "Colors"
- ↑ "HTML Color Names". www.w3schools.com. Retrieved 20 February 2021.