Skip to content

Developer tools

Color Converter & Contrast Checker

Convert any CSS colour between HEX, RGB, HSL and CMYK, get matching tints and shades, and check that text is readable on your background.

Not a colour CSS understands.

Tints and shades

Contrast checker (WCAG)

Large heading text

Normal body text should be easy to read.

How to use the Color Converter & Contrast Checker

  1. 1

    Type any CSS colour (#7c3aed, rgb(…), hsl(…) or a name like teal) or use the picker.

  2. 2

    Copy the format you need, or a tint/shade from the palette.

  3. 3

    Below, set a text and background colour to check the WCAG contrast ratio.

Frequently asked questions

What contrast ratio do I need?

WCAG AA needs 4.5:1 for normal text and 3:1 for large text (about 24 px, or 19 px bold). AAA needs 7:1 and 4.5:1.

HEX or HSL?

Both describe the same colour. HSL is easier to adjust by hand (change the lightness for hover states), HEX is the most common in design files.

Embed this tool on your site

Paste this code into your page. It's free, with no sign-up, ads or cookies.

Preview

Please keep the "Powered by Dev-Talk" link.

Get new articles in your inbox

Practical tutorials and deep dives, about once a week. No spam, unsubscribe anytime.

Privacy policy

Add DEV Talk to your Home Screen

  1. 1 Tap the Share button in Safari's toolbar.
  2. 2 Scroll down and tap Add to Home Screen.
  3. 3 Tap Add. Open it from the Home Screen to read like an app and to turn on notifications with the bell.

We use cookies to improve your experience and analyze traffic. By continuing, you agree to our Privacy Policy.