Color Converter

Convert colors between HEX, RGB and HSL, preview them, and check WCAG contrast — all in your browser.

#3b82f6
Contrast
vs White3.68:1 AA-large
vs Black5.71:1 AA
HEX
#3b82f6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)

Color Formats & Accessibility

HEX, RGB and HSL are three ways to describe the same color. This tool converts between them and computes the WCAG contrast ratio against white and black, so you can check whether text will be readable. A ratio of 4.5:1 passes WCAG AA for normal text.

Frequently asked questions

How do I convert HEX to RGB or HSL?

Paste or pick a color and it is instantly shown in HEX, RGB and HSL at the same time. Editing any format updates the others, and a live swatch shows the result.

What is a WCAG contrast ratio and why does it matter?

It measures the luminance difference between text and its background. WCAG requires at least 4.5:1 for normal text (AA) and 7:1 (AAA) for the best readability. The tool checks your color against black and white so you can confirm accessibility.

What does the alpha channel in 8-digit HEX do?

The last two hex digits set opacity, from 00 (fully transparent) to FF (fully opaque). For example #3b82f680 is a blue at 50% opacity.