Color format converter
Paste any color format (hex / rgb / hsl / oklch / oklab / CSS named) and get all five formats live, plus the nearest Tailwind class. Runs entirely in your browser.
Detected format: hex
Preview: #1e90ff
Nearest CSS named color: dodgerblue (ΞE 0.000)
Hex
#1e90ff
RGB
rgb(30, 144, 255)
HSL
hsl(210, 100%, 56%)
OKLCH
oklch(65.2% 0.19 253.2)
OKLab
oklab(65.2% -5.5% -18.2%)
Nearest Tailwind class
- bg-blue-500ΞE 0.036
- bg-sky-500ΞE 0.071
- bg-indigo-500ΞE 0.106
βΊHow to use
- Paste any color:
#1e90ff,rgb(30, 144, 255),hsl(210, 100%, 56%),oklch(64% 0.19 250), ordodgerblueβ all accepted. - All five formats update live on the right. Hit
Copyon any row. - Below, the closest Tailwind classes are sorted by perceptual distance (OKLab ΞE) β handy for mapping brand colors.
- State is mirrored into the URL hash (
#1e90ff), so you can share a configuration by copying the URL.
Tips
- OKLCH is the new CSS Color Level 4 format. Tailwind v4 ships with it; brightness perception is more accurate than HSL.
- ΞE measures perceptual color distance β anything under ~1 is hard to tell apart by eye.
- 8-digit hex (with alpha) is supported:
#1e90ff80means 50% transparency.
Related tools
- Tailwind palette generatorGenerate the full 50-950 shade ramp from one brand colour. Outputs Tailwind v4 @theme, v3 config, and CSS variables
- WCAG + APCA contrast checkerLive WCAG 2.1 ratio + APCA Lc for any foreground/background pair, with one-click fix suggestion when failing
- Colour-blindness Simulator (8 + normal)Brettel / Machado matrix simulation of 8 deficiencies. Compare palettes or your own image side-by-side. Designer-grade accessibility check