Hex to RGB Converter

Convert hex color codes to RGB values instantly with our free online converter. Enter any hex color (like #FF5733) and see the RGB equivalent, color preview, and CSS code. Perfect for web designers and developers.

Hex to RGB ConverterInputHex color: #FF5733ResultRGB(255, 87, 51) — Live color preview shown
hex to rgb showing example with input "Hex color: #FF5733" and result "RGB(255, 87, 51) — Live color preview shown"

Hex to RGB Converter

#
#3B82F6

Red

59

Green

130

Blue

246

RGB Values

59, 130, 246

CSS Output

rgb(59, 130, 246)

How to Use This Hex To Rgb

  1. 1Enter a hex color code in the input field (with or without the # symbol).
  2. 2The converter instantly displays the RGB values for that color.
  3. 3View the live color preview to confirm it is the correct shade.
  4. 4Copy the RGB values or CSS code to use in your project.

What Is a Hex To Rgb?

Hexadecimal (hex) and RGB are two different ways to represent colors in digital design. Hex colors use a six-digit code prefixed with #, where each pair of digits represents the intensity of red, green, and blue respectively. RGB colors use three decimal numbers from 0 to 255 to represent the same red, green, and blue intensities. For example, the hex color #FF5733 converts to RGB(255, 87, 51). Both formats produce the exact same color — they are simply different notations. Web designers and developers frequently need to convert between these formats depending on the requirements of their CSS, design software, or programming environment.

Hex To Rgb Formula

To convert hex to RGB, split the hex code into three pairs of digits. Convert each pair from hexadecimal to decimal. The formula for each channel is: decimal = (first_hex_digit × 16) + second_hex_digit. For example, FF in hex = (15 × 16) + 15 = 255 in decimal. Repeat for all three color channels (red, green, blue).

For hex #FF5733: Red = FF = 255, Green = 57 = 87, Blue = 33 = 51. Therefore, #FF5733 = RGB(255, 87, 51).

1Enter a hex...Enter a hex color code...2The converter instantly...The converter instantly displays the...3View the live...View the live color preview...4Copy the RGB...Copy the RGB values or...
How hex to rgb works in 4 simple steps

Tips for Using This Hex To Rgb

Always include the # symbol when writing hex colors in HTML and CSS. When a hex code has repeating pairs (like #FF0000 or #112233), you can use shorthand notation (#F00 or #123). Our converter handles both full 6-digit codes and 3-digit shorthand. For semi-transparent colors, convert to RGBA by adding an alpha channel (0 to 1). If you need the CMYK equivalent for print design, use a dedicated hex-to-CMYK converter as the conversion involves color space mathematics.

Common Values

Hex CodeRGB ValueColor Name
#FF0000rgb(255, 0, 0)Red
#00FF00rgb(0, 255, 0)Green
#0000FFrgb(0, 0, 255)Blue
#FFFF00rgb(255, 255, 0)Yellow
#FF00FFrgb(255, 0, 255)Magenta
#00FFFFrgb(0, 255, 255)Cyan
#000000rgb(0, 0, 0)Black
#FFFFFFrgb(255, 255, 255)White
#808080rgb(128, 128, 128)Gray
#FFA500rgb(255, 165, 0)Orange
#800080rgb(128, 0, 128)Purple
#FFC0CBrgb(255, 192, 203)Pink
#A52A2Argb(165, 42, 42)Brown
#FFD700rgb(255, 215, 0)Gold
#C0C0C0rgb(192, 192, 192)Silver

About This Tool

Color representation is one of the foundational concepts in digital design. Every pixel on every screen is defined by numeric color values, and different industries and technologies prefer different formats. Web developers traditionally use hex colors in CSS, while graphic designers and video editors often work with RGB values in software like Photoshop and Premiere. The ability to quickly convert between these formats saves time and prevents errors when collaborating across disciplines. Our hex to RGB converter handles any valid hex code instantly, showing both the numeric values and a live preview so you can verify the color is exactly what you intended.

Related Tools

Frequently Asked Questions About Hex To Rgb

Yes, our converter is completely free with unlimited conversions. No signup required.
Hex uses a 6-digit hexadecimal code (like #FF5733) while RGB uses three decimal numbers (like rgb(255, 87, 51)). Both represent the same color in different formats.
Our converter works with or without the # symbol. #FF5733 and FF5733 will produce the same result.
RGBA adds an alpha (transparency) channel to RGB. For example, rgba(255, 87, 51, 0.5) is 50% transparent. Our converter shows RGB values; add the alpha channel manually.
Use our RGB to Hex converter (available by swapping the conversion direction) to convert RGB values back to hex codes.
Color appearance varies due to different monitor calibrations, color profiles, and display technologies. Our converter gives mathematically accurate values, but visual appearance may vary slightly.
Web-safe colors are a palette of 216 colors that display consistently across all browsers and monitors. Most modern devices support millions of colors, making web-safe colors largely unnecessary today.
Our tool converts hex to RGB. For print design, you need a separate hex-to-CMYK converter because CMYK conversion involves color space profiling specific to your printer.