Skip to main content

HEX to RGB Converter

Convert HEX to RGB or type RGB channels to get a HEX code. Shorthand HEX and optional alpha are supported, with a preview that stays stable while you correct invalid input.

Enter a color

Accepted: #RGB, #RGBA, #RRGGBB, #RRGGBBAA.

Live preview and output

HEX#7C41E1
RGBrgb(124, 65, 225)
HSLhsl(262, 73%, 57%)

How to use it

  1. Type or paste a three-, four-, six-, or eight-digit HEX value.
  2. Or edit the RGB channels and optional alpha field from 0 to 1.
  3. Copy the normalized HEX, RGB/RGBA, or HSL result.

Practical uses

  • Translate a design-system token between CSS formats.
  • Inspect RGB channel values in a HEX color.
  • Convert a transparent HEX color to CSS rgba().

Good to know: Alpha is shown in HEX as an 8-digit #RRGGBBAA value when below 1, rounded to the nearest 8-bit alpha step. HSL values are rounded for display, so converting that displayed HSL back may differ by a channel.

Frequently asked questions

Does #ABC work?

Yes. Each digit is repeated, so #ABC becomes #AABBCC.

What does the fourth or eighth HEX digit mean?

It is the alpha channel. #RGBA expands to #RRGGBBAA; 00 is fully transparent and FF is fully opaque.

Explore more color tools

Continue your workflow with another focused tool.