Colors and Their Hex Codes: Copyable List + Converter
Colors and Their Hex Codes
A hex code is a short text value that describes a color for the web. You will see it in CSS, design tools, and brand guidelines, usually as a # followed by six characters such as #0E5A68. This guide explains how the format works, then gives you a copyable reference of common named colors and a converter you can use right away.
How a hex code works
A six-digit hex code is three pairs of characters: red, green, and blue. Each pair is a hexadecimal number from 00 (none of that channel) to FF (the maximum). Mixing the three channels produces the final color.
#0E5A68Illustrative breakdown. Bars show each channel as a share of the 0–255 range.
Reading hex values
Hexadecimal is base 16, so each digit has 16 possible values. The digits 0–9 keep their usual value, and the letters A–F stand for 10–15. Letters are not case sensitive, so #ff8800 and #FF8800 are the same color.
- A = 10
- B = 11
- C = 12
- D = 13
- E = 14
- F = 15
To convert a pair by hand, multiply the first digit by 16 and add the second. For 5A, that is 5 × 16 + 10 = 90. With 256 values per channel, three channels give 256 × 256 × 256 = 16,777,216 possible colors.
| Format | Example | Notes |
|---|---|---|
| Hex (6 digits) | #0E5A68 | The standard form. |
| Hex shorthand (3 digits) | #F80 | Each digit is doubled, so this equals #FF8800. Only works when each pair has matching digits. |
| Hex with alpha (8 digits) | #0E5A6880 | The last pair sets opacity. 80 is about 50%. |
| RGB | rgb(14, 90, 104) | The same color written in decimal. |
Common colors and their hex codes
These are standard CSS color names with their official hex values. Select a swatch to copy its hex code, or use the filters to narrow the list by color family.
Hex and RGB converter
Enter a value in either tool. Hex input accepts 3 or 6 digits, with or without the #.
Practical tips
- Keep a small, fixed palette and reuse the same hex values everywhere, so your colors stay consistent.
- Check text contrast, not just appearance. WCAG recommends a contrast ratio of at least 4.5:1 for normal-size text.
- Use hex for static colors and the 8-digit form or
rgba()when you need transparency. - Always include the
#in CSS. Without it, the value is not valid.
FAQ
Are hex codes case sensitive?
#a9d94b and #A9D94B produce the same color. Pick one style and stay consistent.Why do some hex codes have only three digits?
#0AF expands to #00AAFF. If any pair has two different digits, you need the full six-digit form.