Color Converter
Runs locally in your browser. Your input is not uploaded.Free, no sign-up
HEX, rgb(), hsl(), hwb(), oklch(), oklab(), a CSS name, or 0xAARRGGBB.
| HEX | #3b82f6 | |
|---|---|---|
| RGB | rgb(59 130 246) | |
| RGB (legacy) | rgb(59, 130, 246) | |
| HSL | hsl(217.2 91.2% 59.8%) | |
| HWB | hwb(217.2 23.1% 3.5%) | |
| OKLCH | oklch(62.308% 0.18801 259.815) | |
| Java (AWT) | new Color(59, 130, 246) | |
| Android / ARGB int | 0xFF3B82F6 | |
| CMYK (approx.) | cmyk(76% 47.2% 0% 3.5%) |
Contrast (WCAG 2)
On white:3.67:1AA failAAA failAA large pass
On black:5.70:1AA passAAA failAA large pass
On a background of this color, black text is easier to read.
Convert colors between HEX, RGB, HSL, HWB and OKLCH, and check their contrast.
How to use the Color Converter
- Type or paste a color in any CSS format, or use the color picker.
- Copy it as HEX, RGB, HSL, HWB or OKLCH, or as Java and Android code.
- Check its contrast against white and black before using it for text.
Supported formats
- HEX:
#3b82f6, short#38f, with alpha#3b82f680 - RGB:
rgb(59 130 246),rgb(59 130 246 / 50%)and legacyrgba(59, 130, 246, 0.5) - HSL and HWB:
hsl(217 91% 60%),hwb(217 23% 4%); hues in deg, rad, grad or turn - OKLCH and OKLab:
oklch(62% 0.19 260), the perceptual spaces used by Tailwind CSS v4 - Names: all 148 CSS named colors, like
rebeccapurple, andtransparent - Android / Java:
0xFF3B82F6(ARGB: alpha first)
Frequently asked questions
Why is my OKLCH color "outside the sRGB gamut"?
OKLCH can describe colors more saturated than an sRGB screen can show. HEX and RGB can't express them, so the tool shows the nearest sRGB color and tells you it was clipped.
What do AA and AAA mean?
They are WCAG 2 contrast levels. Normal text needs at least 4.5:1 for AA and 7:1 for AAA; large text (about 24px, or 19px bold) needs 3:1 for AA.
Is CMYK exact?
No. It's a simple formula without a printer color profile, fine as a starting point but not for print proofs.
Is my color uploaded?
No. All conversions run in your browser.
Related tools
All tools- CSS Formatter / MinifierFormat CSS, SCSS and Less, or minify CSS stylesheets.
- HTML FormatterFormat and minify HTML and check its basic structure.
- Regex TesterTest regular expressions with live match highlighting, capture groups, flags and explanations.
- Cron Expression GeneratorBuild Linux cron expressions with a visual editor and preview the next run times.
- Diff CheckerCompare two texts side by side or as a unified diff, with added, removed and changed lines.