DevTilt

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.

What is HEX to RGB Converter?

Design tools export colors as #RRGGBB hex values, but CSS rgba() functions and JavaScript canvas APIs need separate R, G, B integers. Convert any six-digit hex color to its RGB components instantly — including shorthand #RGB notation.

Why use DevTilt's HEX to RGB Converter?

  • Converts #RRGGBB and #RGB shorthand hex
  • Outputs R, G, B as integers 0–255
  • Live color preview swatch
  • Copy as rgb() CSS function or comma-separated values

Common use cases

  • Translating a Figma hex color to rgba() for a CSS overlay
  • Setting canvas fillStyle from a design system hex token
  • Converting brand colors for a charting library config
  • Debugging why a hex value doesn't match an RGB screenshot

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.