About this tool
Colors can be described in many ways: as a HEX code like #2563eb in web design, as RGB values for screens, as HSL for intuitively adjusting lightness and saturation, as OKLCH for perceptually even gradients in modern CSS, or as CMYK for print. This color converter converts a color into all of these formats at once.
It also creates tints and shades of the color for palettes and hover states. The contrast checker calculates the contrast ratio between text and background color and shows whether the combination meets the WCAG 2.2 requirements for normal and large text and for UI components.
How it works
- Enter a color in any format, e.g. #2563eb, rgb(37 99 235), oklch(…) or a CSS name like rebeccapurple – or use the color picker.
- Copy the format you need from the list.
- Click a swatch in the tints and shades to use that color.
- In the contrast checker, pick text and background color and see which WCAG levels pass.
Frequently asked questions
Which contrast ratio is sufficient?
For level AA, WCAG requires at least 4.5:1 for normal text and 3:1 for large text (from 24 px, or 18.66 px bold) as well as for UI components and graphics. Level AAA requires 7:1 and 4.5:1 respectively.
What is OKLCH and why is it recommended?
OKLCH describes colors by lightness (L), chroma (C) and hue (H) the way humans perceive them. Unlike HSL, two colors with the same L value really look equally light. That makes OKLCH well suited for color palettes and design systems. All modern browsers support it in CSS.
Are the CMYK values ready for print?
No, they are a simple, device-independent approximation. How a color looks in print depends on paper, printing process and color profile. For print, use the values from your print shop or a suitable ICC profile.
What do 8-digit HEX codes mean?
The last two digits define the opacity (alpha): #2563eb80 is the color at about 50 % opacity. Short forms like #fff or #ffff are recognized too.
Can I use my colors for a QR code?
Yes. In the QR Code Generator, use a dark foreground on a light background with high contrast so the code scans reliably.