Gigi Tools

HEX to RGB Converter

Convert HEX color codes to RGB values, supports 3-digit and 6-digit formats

Enter HEX Color Code

Common Colors

Color Preview
Conversion Result

R

59

G

130

B

246

rgb(59, 130, 246)

How to Use

  1. Enter a HEX color code in the input field (e.g. #FF0000 or #F00)
  2. The tool instantly converts and displays the corresponding R, G, B values
  3. Click the "Copy" button to copy the rgb() formatted color code
  4. You can also click the common color shortcut buttons below for quick selection

FAQ

What is a HEX color code?

A HEX color code represents colors using hexadecimal notation in the format #RRGGBB, where RR, GG, BB represent the red, green, and blue color channels respectively, ranging from 00-FF (decimal 0-255). There's also a shorthand #RGB format where each digit is expanded to two (e.g. #F00 = #FF0000).

What's the difference between HEX and RGB?

HEX and RGB essentially represent the same color, just in different formats. HEX uses hexadecimal (e.g. #3B82F6), while RGB uses decimal (e.g. rgb(59, 130, 246)). HEX is commonly used in HTML/CSS, while RGB is more intuitive in graphic design and CSS functions.

Why does my color code show as invalid?

Please verify the format: a HEX code should be # followed by 3 or 6 hexadecimal characters (0-9, A-F). For example, #FFF and #ffffff are both valid. Make sure there are no spaces or special characters.