Color converter

Type a color in any format or pick one, and read every other format. The contrast ratio shows how readable text on it is.

Color converter runs entirely in your browser: the text you paste is never sent to a server. It is free and needs no sign-up.

How to use it

  1. Enter or pick a color Type a color as HEX, rgb(), rgba(), hsl(), or hsla(), or use the picker. Each format is shown at once, with a preview swatch.
  2. Copy a format Press Copy beside HEX, RGB, or HSL to copy that value. Eight-digit HEX and alpha values keep their transparency.
  3. Check the contrast The contrast rows show the WCAG ratio against white and against black, and say whether each one passes the 4.5 to 1 level for normal text. Transparency is not counted.

Questions

Does the converter support CMYK?

No. CMYK values depend on the printing profile, so converting a screen color to CMYK here would be misleading. The tool works with HEX, RGB, and HSL only.

How is the contrast ratio calculated?

It applies the WCAG 2 relative luminance formula to the red, green, and blue channels and gives a ratio from 1 to 21. Transparency is not considered, so a semi-transparent color is judged by its channels alone.