Skip to main content

Color Converter & Contrast Checker

Any CSS color: hex, names, rgb, hsl, hwb, lab, lch, oklab, oklch, color() or device-cmyk.

Press Run or Ctrl/⌘+Enter to see the result.

Everything is processed in your browser. Nothing is uploaded.

About this tool: Color Converter & Contrast Checker

Convert any CSS color between HEX, RGB, HSL, HWB, OKLCH, OKLab and CMYK, pick a color visually, and check its contrast against a background using WCAG 2 ratios and APCA. A tints and shades generator builds a scale from one color. Colors that fall outside the sRGB gamut are flagged so you know the conversion is approximate.

Common uses

  • Translating a design token from HEX to OKLCH
  • Confirming body text meets WCAG AA contrast
  • Building a lighter and darker scale from a brand color

Frequently asked questions

What contrast ratio does WCAG require?
WCAG 2 AA asks for at least 4.5:1 for normal text and 3:1 for large text. AAA raises these to 7:1 and 4.5:1.
Why use OKLCH?
OKLCH is perceptually uniform, so changing lightness or chroma behaves predictably, which makes it well suited to generating color scales.
What does out-of-gamut mean?
The color cannot be shown exactly in sRGB. The tool displays the nearest in-gamut value and warns you.