- All tools
- Color converter
How do I convert a HEX color to RGB, HSL or OKLCH?
Type a color in any CSS format — #066b64, rgb(), hsl(), oklch() or a name like teal — or use the picker, and the page shows it in HEX, RGB, HSL, HWB, OKLCH and approximate CMYK, each ready to copy. It also builds a scale of tints and shades with even perceived lightness, and checks the contrast against a background color for the WCAG AA and AAA levels.
- Type a color in any format, or pick one.
- Copy the format you need.
- Check contrast against your background.
Tints and shades
Steps of equal perceived lightness (OKLCH), keeping the hue. Click one to use it.
Contrast check (WCAG 2.2)
What this page can do
- Reads any color your browser understands, including names
- HEX, RGB, HSL, HWB, OKLCH and CMYK output
- Transparency (alpha) carried through
- 10-step tint and shade scale in OKLCH
- WCAG 2.2 contrast ratio with AA / AAA results
- Live text preview on your background
When to use this page
- Translating a brand color between design tools and CSS.
- Checking whether text on a colored button meets accessibility guidelines.
- Building a consistent light-to-dark scale from one brand color.
When to use something else
- You need exact print colors — CMYK here is a simple formula, not a printer profile; ask your printer for proofs.
- You work with wide-gamut Display P3 colors — values are converted to sRGB.
- You need Pantone matches — those require the licensed Pantone library.
How it compares with other options
Design tools such as Figma and browser developer tools convert colors and show contrast too, and the WebAIM checker is a common reference. This page puts the conversions, a perceptual scale and the contrast check together, using your browser’s own color parser, so whatever CSS accepts is accepted here. Contrast follows the WCAG 2.2 formula, which is what audits test.
Where your data goes
Nowhere. Everything is computed by your own browser. Nothing you paste is sent to a server, logged or stored — close the tab and it is gone. You can check it yourself: open your browser’s network panel — the page still loads its own code and any ads, but no request carries what you typed.
Questions about this tool
What is OKLCH, and why use it?
OKLCH describes a color by lightness, chroma (colorfulness) and hue, designed so that equal steps look equally different to the eye. Unlike HSL, two colors with the same OKLCH lightness really look equally light, which makes it reliable for building palettes and themes. All modern browsers support it in CSS.
Which contrast ratio do I need?
WCAG level AA asks for at least 4.5:1 for normal text and 3:1 for large text (24 px, or 18.7 px bold) and for icons and input borders. Level AAA asks for 7:1 and 4.5:1. Most accessibility laws and audits use AA.
Why is the CMYK value only approximate?
Real CMYK depends on the paper, the inks and the printer’s color profile. The value here uses the simple standard formula, which is fine for a starting point, but a printer’s proof is the only reliable check.
Why do some vivid colors change slightly?
The page works in sRGB, the standard color space of the web. Colors outside it — for example very saturated Display P3 or OKLCH values — are mapped to the closest sRGB color, and the HEX and RGB values show that mapped color.