Color Converter — HEX, RGB, HSL, OKLCH
Convert any color between HEX, RGB, HSL and OKLCH with a live preview swatch. Pick a color visually or type a HEX value and copy any format.
One color, four formats
Enter a HEX value or use the color picker to see the color as HEX, RGB, HSL and modern OKLCH at once. A large swatch previews the exact shade, including transparency when you use 8-digit HEX with an alpha channel.
Why OKLCH matters
OKLCH is a perceptually uniform color space now supported across browsers. It makes lightness and chroma adjustments look consistent to the human eye, which is why design systems increasingly define palettes in OKLCH. This converter computes it precisely from sRGB.
Copy-ready CSS
Every format is output as valid CSS — rgb(), hsl() and oklch() — so you can paste straight into a stylesheet. Alpha is included automatically when your color is not fully opaque.
How to hex to rgb converter
- Pick a color with the swatch picker or type a HEX code.
- See it converted to RGB, HSL and OKLCH.
- Check the preview swatch for the exact shade.
- Copy the CSS format you need.