Skip to content

Hex to RGB Converter

Convert hexadecimal color codes to RGB values instantly. Enter a hex color like #FF5733 and get the RGB equivalent. All conversions happen in your browser.

Synchronized color

#FF5733

Parsed as RGB; malformed or out-of-range channels are rejected, never silently clamped.

Integer or percentage RGB, modern or legacy CSS, Hex with optional alpha, HSL, HSV, OKLCH, LAB, LCH, CMYK, or a CSS name.

100%

Adjust channels

255
87
51

Share this exact input

?color=FF5733

One input, implementation-ready output

Color workspace

Hex

#RRGGBB

#FF5733

CSS RGB

Modern space syntax

rgb(255 87 51)

Legacy RGB

Comma syntax

rgb(255, 87, 51)

RGB %

Percentage channels

rgb(100% 34.1% 20%)

HSL

CSS hue, saturation, lightness

hsl(11 100% 60%)

HSV / HSB

Design-tool model

hsv(11, 80%, 100%)

OKLCH

Perceptual CSS color

oklch(68% 0.21 33.7)

LAB

CSS Lab, D50

lab(61.03% 63.55 55.96)

LCH

CSS LCH, D50

lch(61.03% 84.67 41.37)

CMYK

Unprofiled approximation

cmyk(0%, 66%, 80%, 0%)

How to Convert Hex to RGB

A hex color code is three hexadecimal (base-16) numbers written back to back. Converting to RGB is just reading each pair as a decimal number:

  1. Split the 6-digit hex code into three pairs: RR (red), GG (green), BB (blue).
  2. Convert each pair from hexadecimal to decimal: multiply the first digit by 16 and add the second digit (A=10, B=11, C=12, D=13, E=14, F=15).
  3. Each result is a channel value from 0 to 255.
  4. Write the result as rgb(R, G, B).

Example: convert #FF5733 to RGB

FF → (15 × 16) + 15 = 255 (red)

57 → (5 × 16) + 7 = 87 (green)

33 → (3 × 16) + 3 = 51 (blue)

Result: rgb(255, 87, 51)

How to Use the Hex to RGB Converter

Enter your hexadecimal color code in the input field with or without the # symbol. The converter instantly displays the RGB equivalent, CSS rgb() output, HSL, and CMYK values. Click any copy button to copy the value to your clipboard. Your recent colors are saved for quick access.

Understanding Hex Color Codes

Hexadecimal color codes are six-digit codes that represent colors using base-16 notation. The first two digits represent red, the middle two represent green, and the last two represent blue. Each pair can range from 00 (0) to FF (255), creating over 16 million possible colors. This format was introduced in HTML 3.2 and remains the most common way to specify colors in web design.

Common Use Cases

Web developers use hex to RGB conversion when working with JavaScript color manipulation, CSS variables, or APIs that require RGB format. Designers often need to convert between formats when moving between different design tools. The RGB format is particularly useful for calculating color blends, adjusting brightness, and working with transparency.

Hex to RGB Conversion Table

Hex and RGB values for the most commonly used colors. Click any hex code to load it into the converter above.

ColorNameHexRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Lime#00FF00rgb(0, 255, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Cyan#00FFFFrgb(0, 255, 255)
Magenta#FF00FFrgb(255, 0, 255)
Silver#C0C0C0rgb(192, 192, 192)
Gray#808080rgb(128, 128, 128)
Maroon#800000rgb(128, 0, 0)
Olive#808000rgb(128, 128, 0)
Green#008000rgb(0, 128, 0)
Purple#800080rgb(128, 0, 128)
Teal#008080rgb(0, 128, 128)
Navy#000080rgb(0, 0, 128)
Orange#FFA500rgb(255, 165, 0)
Pink#FFC0CBrgb(255, 192, 203)
Gold#FFD700rgb(255, 215, 0)
Brown#A52A2Argb(165, 42, 42)
Coral#FF7F50rgb(255, 127, 80)
Indigo#4B0082rgb(75, 0, 130)
Violet#EE82EErgb(238, 130, 238)
Salmon#FA8072rgb(250, 128, 114)

Need a value that is not listed? Browse the full color library — every hex code has a page with its RGB, HSL, CMYK and OKLCH values, contrast ratios, tints, shades and matching palette colors.

Frequently Asked Questions about Hex to RGB Converter

Hex (hexadecimal) uses a 6-character code starting with # to represent colors (e.g., #FF5733), while RGB uses three decimal numbers from 0-255 for red, green, and blue channels (e.g., rgb(255, 87, 51)). Both represent the same colors, just in different notation systems.