Color code converter
Convert colors between HEX, RGB, and HSL with a live preview in your browser without uploading anything.
Values you enter never leave this device.
How to use it
- 1
Type a color in any field
Click the HEX box, the three RGB boxes, or the three HSL boxes and type a value. The other two groups follow as soon as the value is valid.
- 2
Check the preview
The color swatch at the top shows the color you entered. If a value is not valid, the swatch and the other fields keep the last valid color.
- 3
Read the other codes
HEX is shown as six capital digits, RGB as three whole numbers from 0 to 255, and HSL as hue in degrees with saturation and lightness in percent. If you type an HSL value, the HEX is the closest match, and converting that HEX back to HSL may give a slightly different value from what you typed. Very dark or very pale colors can differ by a lot, especially in hue.
- 4
Pick a color from an image
Choose an image, click a spot to pick its color, or press one of the main colors. Then press Use this color. The image stays in your browser. Matching colors and a contrast ratio check for text and background are shown below.
- 5
Copy the value you need
Select the text in a field and copy it into your stylesheet, design tool, or document.