HEX to RGB Converter

Turn a hex color into an rgb() function and individual channel values. Conversion runs locally with live updates as you type.

Accepts 3- or 6-digit hex, with or without #.

Result

Type a hex color to see rgb() output.

How to convert HEX to RGB

  1. Paste or type a hex color (#RRGGBB, #RGB, or 8-digit with alpha).
  2. RGB output updates as you type.
  3. Copy the rgb() or rgba() line, or the channel integers.
  4. Shorthand #abc expands to #aabbcc.

FAQ

Yes. Shorthand like #abc expands to #aabbcc before conversion.
8-digit hex (#RRGGBBAA) outputs rgba() with an alpha channel when present.
No. All math runs in your browser.
Shorthand hex repeats each digit — #abc equals #aabbcc. Both produce the same RGB channels after expansion.
Yes. Copy the rgb() or rgba() line from the output. Channel integers are also shown if you need R, G, and B separately.

Related tools