Skip to content
Shrake DevTools
  • JSON FormatterData & Format
  • JSON ValidatorData & Format
  • JSON MinifierData & Format
  • JSON ↔ YAML ConverterData & Format
  • XML FormatterData & Format
  • Base64 Encoder / DecoderData & Format
  • URL Encoder / DecoderData & Format
  • JWT InspectorData & Format
↑ ↓ to navigate↵ to openEsc to close

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
RGBrgb(59 130 246)
RGB (legacy)rgb(59, 130, 246)
HSLhsl(217.2 91.2% 59.8%)
HWBhwb(217.2 23.1% 3.5%)
OKLCHoklch(62.308% 0.18801 259.815)
Java (AWT)new Color(59, 130, 246)
Android / ARGB int0xFF3B82F6
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

  1. Type or paste a color in any CSS format, or use the color picker.
  2. Copy it as HEX, RGB, HSL, HWB or OKLCH, or as Java and Android code.
  3. 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 legacy rgba(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, and transparent
  • 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.