DFK Studio

Convert colours and check contrast

Convert HEX, RGB and HSL in any direction and see the WCAG contrast against white and black. Runs in your browser.

  • Free, no account
  • Nothing is uploaded
  • Runs in your browser

How it works

  1. 1 What goes in A colour in any notation
  2. 2 It runs in your browser On your own device. Nothing is uploaded, there is no queue and no account, and it keeps working with the network switched off.
  3. 3 What comes back The rest, and its contrast

What it does

Paste a colour in any common notation and get the others back, along with the WCAG contrast ratio against white and black — which is the number that decides whether text on it is actually readable.

This page does the work itself. Your colour is handled by the browser and never sent anywhere — there is no server here to send it to.

Questions

What contrast ratio do I need?

WCAG asks for 4.5:1 for body text and 3:1 for large text, which is 24px or 19px bold and up. 7:1 meets the stricter AAA level. The figures here are computed from relative luminance, which is the definition the standard is written against — not from how bright the colour looks.

Why do the same colours look different in my design tool?

Usually a colour space difference. These conversions are plain sRGB, which is what a CSS hex value means. A tool working in display-P3 or in a wider space will show a more saturated version of the same numbers.

Does it handle alpha?

Eight-digit hex and rgba are read, and the alpha is reported. The contrast figures ignore it, because the real contrast of a translucent colour depends on whatever is behind it.

Every shelf