Web color
Web colours are colours used in designing webpages, and the ways for describing and listing those colours.
There are several ways to choose colours for parts of webpages. Colours 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 colours. Standard colours can also be chosen by their common English names. Often a colour tool or other graphics software is used to create colour values.
The first versions of Mosaic and Netscape Navigator used the X11 colour names as the base for their colour lists. This was because they both started as X Window System applications.
Each web colour 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 colour management, the colours created are fairly close to the given values. However, user agents can be different in the fidelity with which they show the colours. Better user agents use colour management to create better colour 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 colours. The bytes represent the red, green and blue parts of the colour. 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 colour component. The hex triplet is formed by concatenating three bytes in hexadecimal notation, in the following order:
- Byte 1: red value (colour type red)
- Byte 2: green value (colour type green)
- Byte 3: blue value (colour type blue)
For example, consider the colour where the red/green/blue values are decimal numbers: red=36, green=104, blue=160 (a greyish-blue colour). 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 colours
Formulated in 1997, there were originally 16 colours. 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 colours that can be used for actions like highlighting.
Color[2] | Hexadecimal | Color | Hexadecimal | Color | Hexadecimal | Color | Hexadecimal |
---|---|---|---|---|---|---|---|
aqua | #00FFFF | grey | #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 Colour Names
The table below contains all 140 of the HTML colours. All modern browsers support them. [3]
|
|
|
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.
References
- "Web design details". www.purei.com. Retrieved 27 April 2016.
- HTML 4.01 Specification section 6.5 "Colors"
- "HTML Color Names". www.w3schools.com. Retrieved 20 February 2021.