All tools

Color Converter & Contrast

Convert between hex, RGB, HSL and OKLCH, and check WCAG contrast.

Everything here runs entirely in your browser. Nothing you type, paste, or upload is ever sent to a server, logged, or stored.

About the Color Converter & Contrast

Converts a colour between hex, RGB, HSL and OKLCH, and calculates the contrast ratio between two colours against the WCAG thresholds for normal and large text.

When you would use it

  • Checking whether text will be readable on a given background.
  • Translating a colour from a design tool into the notation your code uses.
  • Adjusting a colour until it just passes a contrast requirement.

What it does not tell you

A passing contrast ratio is a floor, not a guarantee of legibility — thin weights, small sizes and low-quality screens all make text harder to read at the same ratio. The WCAG formula is also known to treat some colour pairs generously, particularly involving mid greys. OKLCH describes colours outside the range a standard screen can show, so a converted value may be clipped when displayed.