Common colors and their codes
| Color | Name | HEX | RGB | HSL | CSS name |
|---|---|---|---|---|---|
| Gold | #FFD700 | rgb(255, 215, 0) | hsl(51, 100%, 50%) | gold | |
| Pink | #FFC0CB | rgb(255, 192, 203) | hsl(350, 100%, 88%) | pink | |
| Red | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) | red | |
| Blue | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) | blue | |
| Green | #008000 | rgb(0, 128, 0) | hsl(120, 100%, 25%) | green | |
| Yellow | #FFFF00 | rgb(255, 255, 0) | hsl(60, 100%, 50%) | yellow | |
| Purple | #800080 | rgb(128, 0, 128) | hsl(300, 100%, 25%) | purple | |
| White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) | white | |
| Brown | #A52A2A | rgb(165, 42, 42) | hsl(0, 59%, 41%) | brown | |
| Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) | black | |
| Orange | #FFA500 | rgb(255, 165, 0) | hsl(39, 100%, 50%) | orange | |
| Gray | #808080 | rgb(128, 128, 128) | hsl(0, 0%, 50%) | gray | |
| Navy blue | #000080 | rgb(0, 0, 128) | hsl(240, 100%, 25%) | navy | |
| Silver | #C0C0C0 | rgb(192, 192, 192) | hsl(0, 0%, 75%) | silver | |
| Hot pink | #FF69B4 | rgb(255, 105, 180) | hsl(330, 100%, 71%) | hotpink | |
| Teal | #008080 | rgb(0, 128, 128) | hsl(180, 100%, 25%) | teal | |
| Royal blue | #4169E1 | rgb(65, 105, 225) | hsl(225, 73%, 57%) | royalblue | |
| Maroon | #800000 | rgb(128, 0, 0) | hsl(0, 100%, 25%) | maroon | |
| Beige | #F5F5DC | rgb(245, 245, 220) | hsl(60, 56%, 91%) | beige | |
| Sky blue | #87CEEB | rgb(135, 206, 235) | hsl(197, 71%, 73%) | skyblue |
How hex color codes work
A hex color code is a # followed by three pairs of hexadecimal digits for red, green and blue. Each pair runs from 00 (none) to FF (255, full strength), so #FFD700 is red 255, green 215 and blue 0. Three-digit codes are a shorthand that doubles each digit: #FFF is #FFFFFF.
Hex codes with transparency
A fourth pair of digits sets opacity (alpha), from 00 (fully transparent) to FF (opaque). #FFD70080 is gold at about 50%, because 80 in hex is 128 of 255. The short form takes a fourth digit too: #FFF8 is #FFFFFF88. The same color in modern CSS is rgb(255 215 0 / 50%).
Where the color names come from
12 of the colors here, such as red, navy and teal, are among the original 16 HTML 4.01 color names. CSS 2.1 added orange, and the rest, such as gold and hotpink, came from the X11 color names adopted in CSS Color 3.
The colors on this page use the CSS named color values, which every browser understands. For all 148 names, see the color names list. To convert any other color, use the color converter, or pick one from a photo with the image color picker.
