Color Tool - Convert
v1.0.0 • UPDATED DEC 1, 2026
- Runs locally
- Zero dependencies
Convert any CSS color to hex, rgb, hsl and oklch. Type any CSS color or pick one; it all runs in your browser.
Any CSS color
- HEX
- #38bdf8
- RGB
- rgb(56 189 248)
- HSL
- hsl(198.4 93.2% 59.6%)
- OKLCH
- oklch(75.4% 0.139 232.7)
Which format to use
- HEX: compact; best for sharing and design tools.
- RGB: raw channels; best when code does the math.
- HSL: easy to tweak, but equal lightness isn't equal brightness.
- OKLCH: perceptually even; best for design systems and themes.
Tips
- Use OKLCH in CSS, HEX to share.
- Hover states: lower only the lightness,
oklch(from var(--brand) calc(l - 0.1) c h). - Transparency: add
/ 0.5, or two hex digits. - Check if a pair is readable with the Contrast Checker.
- More in my post on oklch() colors.