Accessibility

Color Converter and WCAG Contrast Checker

Convert HEX to RGB, HSL, HSV and CMYK, check WCAG contrast between two colors, and generate matching palettes, locally.

Runs locally in your browser
Accessible text preview
RGB13, 148, 136
HSL175° 84% 32%
HSV175° 91% 58%
CMYK91 0 8 42
Contrast 3.74:1AA FailAAA Fail

What it does

Color & Contrast Studio converts a foreground color into RGB, HSL, HSV and CMYK, and calculates its contrast ratio against a chosen background, with pass or fail badges for WCAG AA and AAA text contrast. Complementary, analogous and triadic palettes are generated from the same color, and browsers that support it can pick a color straight from the screen. It suits designers and developers checking whether text will be readable before shipping it.

How to use it

  1. Set the Foreground and Background colors with the color picker, hex field or screen picker.
  2. Read the RGB, HSL, HSV and CMYK values and the contrast ratio with AA/AAA pass or fail.
  3. Browse the Complementary, Analogous and Triadic palettes and click a swatch to make it the foreground color.

Example

Input
Foreground #0D9488 on background #FFFFFF
Output
Contrast ratio 3.74:1 — AA Fail, AAA Fail

What happens to your file

  • Your file or text is processed by code running in this browser tab. It is not uploaded to any server.
  • The processing code is downloaded from this site with the page; nothing about your input is sent back.
  • The result is created on your device and saved only when you choose to download it.

Limits

  • The screen color picker only works in browsers that implement the EyeDropper API; it is hidden otherwise.
  • Contrast checking uses the normal-text WCAG thresholds only, not the separate large-text thresholds.
  • Only 6-digit hex colors are accepted as input; 3-digit shorthand or named colors are not parsed.

Questions

Which WCAG thresholds does it check?

It flags AA at a 4.5:1 contrast ratio and AAA at 7:1, the standard thresholds for normal body text.

Does it check large-text thresholds too?

No. The pass/fail badges use the normal-text thresholds (4.5:1 and 7:1) only; the lower large-text thresholds are not calculated separately.

What is the 'pick from screen' button?

It uses your browser's built-in EyeDropper API, when available, to sample a color from anywhere on your screen instead of typing a hex value.

What color formats does it show?

RGB, HSL, HSV and CMYK values are calculated from the hex color you enter, alongside a copyable uppercase hex code.

How are the palettes generated?

Complementary, analogous and triadic palettes are derived mathematically by rotating the foreground color's hue, not chosen from a curated design library.

Next steps