Color codes
Hex, RGB, HSL and CMYK codes for named colors, with the different codes sites use for the same color, shades, palettes and matching colors. Paste any code below to find the nearest named color.
Runs in your browser. Nothing you type is uploaded.
Colors
Yellows and browns
Pinks
Blues and greens
Purples and grays
Each page lists every code for the color, compares the codes different sites use for it, and shows shades, palettes, contrast and how the color looks with color blindness.
How to read a hex color code
A hex code like #FFD700 is three pairs of hexadecimal digits: red, green and blue. Each pair runs from 00 (none) to FF (full), which is 0 to 255 in decimal, so one pair is exactly one byte.
| Channel | Hex | Decimal | Binary |
|---|---|---|---|
| Red | FF | 255 | 11111111 |
| Green | D7 | 215 | 11010111 |
| Blue | 00 | 0 | 00000000 |
So gold is full red, a lot of green and no blue. Three-digit codes are a shorthand where each digit is doubled: #FC0 means #FFCC00. An eight-digit code adds a fourth pair for transparency, so #FFD70080 is gold at about 50 percent opacity. Use the RGB to hex converter to go the other way.
Why sites list different codes for the same color
Only 148 colors have official names in CSS, such as gold, pink and saddlebrown. Every browser agrees on those. Names like sage green or pastel pink have no standard, so each color site picks its own code, and they can be far apart. Each color page here shows the main codes in use and how far apart they are, so you can choose one and use it everywhere.
Even the official names have surprises. CSS brown is #A52A2A, which most people would call brick red, and lightpink is darker than pink. Both come from the X Window System color list that CSS adopted.
Frequently asked questions
What is a hex color code?
A six-digit code, written after a #, that tells a screen how much red, green and blue light to mix. Each pair of digits is a number from 0 to 255 written in base 16.
How many hex colors are there?
16,777,216. Each of the three channels has 256 values, and 256 x 256 x 256 is 16,777,216.
What is the difference between HEX and RGB?
Nothing in the color itself. #FFD700 and rgb(255, 215, 0) are the same values, written in hexadecimal and decimal.
How do I find the hex code of a color on my screen?
Use a color picker. Most browsers have one in their developer tools, and design apps like Figma and Canva show the hex code of any color you select. Paste it into the box at the top of this page to find the nearest named color.