About the Color Picker & Converter
Colours on screens are written in several formats. Web designers use HEX codes like #1E90FF, CSS also accepts RGB and HSL, design apps often show HSV (also called HSB), and printers think in CMYK. Moving between them by hand is slow and easy to get wrong.
This colour picker shows one colour in all of these formats at once. Choose a colour with your system picker or paste a code into the HEX, RGB or HSL box, and the other values update as you type. Each value has its own copy button, and a row of lighter tints and darker shades helps you build hover states and palettes. Everything is worked out in your browser.
How to use the Color Picker & Converter
- Click the colour box to open your device’s colour picker, or type a code into the HEX, RGB or HSL field.
- Read the same colour in HEX, RGB, HSL, HSV and CMYK in the table.
- Press Copy next to the format you need and paste it into your CSS or design app.
- Click a tint or shade to switch to a lighter or darker version of the colour.
Conversion formulas
| HEX → RGB | Split #RRGGBB into three pairs and read each pair as a base-16 number (00–FF = 0–255) |
|---|---|
| RGB → HSL | L = (max + min) ÷ 2; S = (max − min) ÷ (1 − |2L − 1|); H = angle of the largest channel on the colour wheel |
| RGB → HSV | V = max; S = (max − min) ÷ max; H as for HSL |
| RGB → CMYK | K = 1 − max; C = (1 − R′ − K) ÷ (1 − K), and the same for M with G′ and Y with B′ |
R′, G′ and B′ are the RGB values divided by 255, so they run from 0 to 1. max and min are the largest and smallest of the three.
Worked example: #1E90FF
| RGB | 1E = 30, 90 = 144, FF = 255 → rgb(30, 144, 255) |
|---|---|
| HSL | max = 1, min = 0.118, L = 0.559 → 56%; S = 0.882 ÷ 0.882 = 100%; H = 210° → hsl(210, 100%, 56%) |
| HSV | V = 100%, S = 0.882 ÷ 1 = 88%, H = 210° → hsv(210, 88%, 100%) |
| CMYK | K = 0, C = 88%, M = 44%, Y = 0% → cmyk(88%, 44%, 0%, 0%) |
Common colours
| Name | HEX | RGB |
|---|---|---|
| White | #FFFFFF | 255, 255, 255 |
| Black | #000000 | 0, 0, 0 |
| Red | #FF0000 | 255, 0, 0 |
| Green (CSS “lime”) | #00FF00 | 0, 255, 0 |
| Blue | #0000FF | 0, 0, 255 |
| Orange | #FFA500 | 255, 165, 0 |
| Grey | #808080 | 128, 128, 128 |
Frequently asked questions
How do I convert a HEX colour to RGB?
Split the six digits into three pairs and convert each pair from base 16 to base 10. For #FF8000, FF = 255, 80 = 128 and 00 = 0, so the RGB value is rgb(255, 128, 0). Paste the code above to do it instantly.
What is the difference between HSL and HSV?
Both use hue and saturation, but HSL has lightness, where 100% is always white, while HSV has value (brightness), where 100% is the brightest version of the colour. CSS supports HSL; many design apps show HSV, sometimes called HSB.
Are the CMYK values exact for printing?
No. The CMYK figures here are a simple mathematical conversion. Real print colours depend on the printer, ink and paper profile, so check important colours with your print shop’s proof.
Can I use a three-digit HEX code?
Yes. A short code like #1AF is expanded by doubling each digit, so it becomes #11AAFF. You can type it with or without the # sign.
Last updated: