Color Converter

Convert between HEX, RGB, and HSL instantly with a live color preview — no design software needed.

Pick a color
RGB values (0–255) and opacity (0–100%)

What is HEX, RGB, HSL, and RGBA?

HEX is a 6-digit code (e.g. #3498db) representing red, green, and blue in base-16. RGB spells the same three channels out as decimal numbers from 0–255, e.g. rgb(52, 152, 219). HSL describes a color by hue, saturation, and lightness instead, which is often more intuitive when you want to lighten, darken, or desaturate a color by hand. RGBA is RGB plus a fourth alpha value (0–1) for opacity — use the Opacity % field above to generate it, or enter an 8-digit HEXA code (e.g. #3498db80) directly.

How to Convert HEX to RGB?

A HEX code splits into three 2-digit pairs — one each for red, green, and blue — and each pair is converted from hexadecimal to decimal:
#3498db → 34 (R) = 52, 98 (G) = 152, db (B) = 219

So #3498db becomes rgb(52, 152, 219).

Why Convert Between Color Formats?

  • HEX is compact and the most common format in CSS and design tools.
  • RGB (and rgba()) is needed when you want to add transparency to a color.
  • HSL (and hsla()) makes it easy to build a color palette by adjusting lightness or saturation without changing the underlying hue.

Related Reading

Want to understand when to reach for each format? Read HEX vs RGB vs HSL: Which Color Format Should You Use? on our blog, or use our dedicated HEX to RGBA Converter for transparency-specific conversions.

More Conversion Tools

Frequently Asked Questions (FAQs)

Does EachConvert store my color values?

No. All conversions happen entirely in your browser. The values you enter are never sent to our server or saved.

Can I enter a 3-digit HEX code like #fff?

Yes. Shorthand 3-digit HEX codes (like #fff for white) are automatically expanded to the full 6-digit form.

What's the difference between RGB and RGBA?

rgba() adds a fourth value for opacity (alpha), from 0 (fully transparent) to 1 (fully opaque), e.g. rgba(52, 152, 219, 0.5).

Can I enter an 8-digit HEXA code with transparency?

Yes. Enter an 8-digit HEX code like #3498db80 — the last two digits set the alpha channel — and the Opacity % field and RGBA output update automatically.

Why does HSL show a different lightness than I expected?

HSL lightness is calculated from the RGB channels' average, not brightness perception, so two colors with the same lightness value can still look different in intensity.