Skip to content
ChromaBrew

HEX to RGB converter

Convert any HEX color to RGB with live preview. Paste a hex code or pick a color and copy the rgb() value instantly.

Result

rgb(71, 0, 58)

oklch(0.27 0.119 337.9)

How to use this tool

  1. Paste a HEX value such as #47003A or pick a color.
  2. The rgb() equivalent updates live as you type.
  3. Copy the result with one click — an OKLCH readout is included for modern CSS.

Frequently asked questions

How do I convert HEX to RGB?
Each HEX pair is a base-16 number: split #47003A into 47, 00 and 3A, then convert each to decimal (71, 0, 58). Paste a code here and the rgb() equivalent updates live.
Does it support 3-digit shorthand like #F00?
Yes. Three-digit HEX is expanded by doubling each digit (#F00 → #FF0000) before conversion.
What else does the converter show?
Besides rgb(), you get an OKLCH readout — the modern CSS color space used by newer design systems — plus a live preview swatch.