sw-tool

HEX to RGB Converter

Aa White text · 3.58:1 · large only
Aa Black text · 5.87:1 ✓ AA
Tints & shades (tap to copy)

Convert HEX color codes to RGB, HSL and CMYK and back. Check WCAG contrast against white and black text, and get tints and shades of any color. Tap any value to copy it.

Type a HEX code or RGB values, or tap the swatch to pick a colour. Tap any value to copy.

How to convert HEX to RGB

Type a code like #E8590C or edit the R, G and B boxes (0–255); every format updates together. Tap the big swatch to open a colour picker. Each row copies in a CSS-ready format.

How HEX codes work

HEX is RGB written in base 16: #E8590C means E8 = 232, 59 = 89, 0C = 12, so rgb(232, 89, 12). Three-digit shorthand like #F80 expands to #FF8800.

HSL and CMYK

HSL describes colour as hue (0–360°), saturation and lightness, which makes it easy to create lighter or darker versions. CMYK is an approximation for print; real printed colour depends on the printer's colour profile.

Color contrast checker (WCAG)

We show the contrast ratio of white and black text on your colour. 4.5:1 passes WCAG AA for normal text; 3:1 passes for large text only. Check button and banner colours before you ship.

FAQ

Can I get a colour from a photo?
Yes. Use the image color picker and tap any spot in your photo.
Can I pick a colour from another window?
In Chrome and Edge, use Pick from anywhere on screen.
Does it support transparency?
Not yet: opaque colours only.

Free Online Calculators →