Skip to content
Design

RGB to Hex Converter

Use RGB sliders (with alpha) or paste a hex code. Get hex, RGBA, HSL, and the nearest of 140 CSS named colors. Check WCAG contrast (AA/AAA) and explore matching palettes — click any swatch to copy.

RGB sliders
R37
G99
B235
A1.00
Values (click to copy)
Contrast (WCAG)
vs white5.17:1 · AA
vs black4.06:1 · Fails
Tints (lighter)
Shades (darker)
Complementary
Analogous
Triadic

All conversions and palette generation happen in your browser. Nothing is uploaded.

How to use this rgb to hex converter

  1. Adjust RGB sliders (with alpha) or paste a hex code.
  2. View hex, RGB, RGBA, HSL and nearest CSS color name.
  3. Check WCAG contrast against white and black.
  4. Click any swatch in tints, shades, complementary, analogous or triadic to copy.

Frequently asked questions

How do I convert RGB to hex?

Each RGB component (0-255) is converted to a 2-digit hexadecimal value. RGB(37, 99, 235) becomes #2563eb.

What does the nearest CSS color name show?

The closest of 140 CSS named colors (red, dodgerblue, lavender, etc.) by Euclidean distance — useful when you need a friendly name.

Can I include transparency?

Yes. Adjust the alpha slider for an 8-digit hex like #2563ebcc.

Is anything uploaded?

No. All conversions and palettes happen in your browser.