Hex to RGB Converter

-hex
-rgb()
NameHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Green#008000rgb(0, 128, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Orange#FFA500rgb(255, 165, 0)
Purple#800080rgb(128, 0, 128)
Google blue#1A73E8rgb(26, 115, 232)
Hot pink#FF69B4rgb(255, 105, 180)
Hex and RGB are two encodings of the same three numbers, per the MDN hex-color reference: #RRGGBB is just hexadecimal notation for the 0-255 values - FF is 255, 00 is 0, and each pair maps to one channel. The three-digit shorthand (#F00) doubles each digit, so it only covers the 17 values where both digits match. Alpha adds a fourth pair (or an 8-digit hex), 255 and FF both meaning fully opaque.
Hex is just RGB written in base 16, two digits per channel: 1A = 26, 73 = 115, E8 = 232 - so #1A73E8 and rgb(26, 115, 232) are the same sentence in two alphabets. Three-digit shorthand doubles each digit (#F00 = #FF0000), and CSS Level 4 added an alpha pair: #1A73E880 is the same blue at 50% opacity.
Why design tools speak hex rather than rgb(): shorter to copy, case-insensitive, and it survives JSON, CSS variables and design tokens without commas or spaces to break - which is why brand guides print #1A73E8, not rgb(26, 115, 232).
NameHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Green#008000rgb(0, 128, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Orange#FFA500rgb(255, 165, 0)
Purple#800080rgb(128, 0, 128)
Google blue#1A73E8rgb(26, 115, 232)
Hot pink#FF69B4rgb(255, 105, 180)
Hex is just RGB written in base 16, two digits per channel: 1A = 26, 73 = 115, E8 = 232 - so #1A73E8 and rgb(26, 115, 232) are the same sentence in two alphabets. Three-digit shorthand doubles each digit (#F00 = #FF0000), and CSS Level 4 added an alpha pair: #1A73E880 is the same blue at 50% opacity.
Why design tools speak hex rather than rgb(): shorter to copy, case-insensitive, and it survives JSON, CSS variables and design tokens without commas or spaces to break - which is why brand guides print #1A73E8, not rgb(26, 115, 232).
NameHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Green#008000rgb(0, 128, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Orange#FFA500rgb(255, 165, 0)
Purple#800080rgb(128, 0, 128)
Google blue#1A73E8rgb(26, 115, 232)
Hot pink#FF69B4rgb(255, 105, 180)
Hex is just RGB written in base 16, two digits per channel: 1A = 26, 73 = 115, E8 = 232 - so #1A73E8 and rgb(26, 115, 232) are the same sentence in two alphabets. Three-digit shorthand doubles each digit (#F00 = #FF0000), and CSS Level 4 added an alpha pair: #1A73E880 is the same blue at 50% opacity.
Why design tools speak hex rather than rgb(): shorter to copy, case-insensitive, and it survives JSON, CSS variables and design tokens without commas or spaces to break - which is why brand guides print #1A73E8, not rgb(26, 115, 232).

Paste a hex code like #1A73E8 and get its RGB equivalent (26, 115, 232) instantly — or paste RGB values and get the hex. A live swatch shows the actual color, so you can confirm you have the right shade before it goes into CSS, Figma or a brand guide.

Both notations describe the same color: hex is just RGB written in base 16 (1A hex = 26). The converter accepts 3-digit shorthand too (#F00 = #FF0000) and outputs the 6-digit canonical form.

How to use

  1. Type a hex code (with or without the #) — RGB values and the color swatch appear instantly.
  2. Or type R, G, B numbers (0–255) to get the hex code.
  3. Copy either format straight into CSS, design tools or documentation.

Worked examples

Convert #FF6B35 to RGB

Split into three pairs and read each in base 16: FF = 15x16 + 15 = 255, 6B = 6x16 + 11 = 107, 35 = 3x16 + 5 = 53. So #FF6B35 is rgb(255, 107, 53) - a warm orange, confirmed by the live swatch above.

The page's own blue: #1A73E8

1A = 26, 73 = 115, E8 = 14x16 + 8 = 232 - rgb(26, 115, 232). Reverse direction: 26 divides by 16 once with 10 left over (digit A), 115 leaves 3 (digit 3), 232 leaves 8 (digit E) - the round trip always lands back on the same hex.

The shorthand form #F83

Three-digit codes double each digit: #F83 expands to #FF8833, which converts to rgb(255, 136, 51). The converter accepts the short form directly - paste it and the expanded hex comes back in the read-only field.

Frequently asked questions

How do I convert HEX to RGB?

Split the hex code into three pairs and convert each from base 16 to base 10. #1A73E8: 1A = 26, 73 = 115, E8 = 232 — so RGB(26, 115, 232). The converter does both pairs live.

What is the difference between HEX and RGB?

None in color — they are two notations for the same values. HEX is compact and universal in design handoffs; RGB(A) supports alpha transparency and reads more explicitly in CSS.

What are 3-digit hex codes?

Shorthand where each digit is doubled: #F00 expands to #FF0000 (red). It exists for brevity; the converter accepts it and outputs the full 6-digit form.

What is RGBA?

RGB plus an alpha channel for opacity (0–1). This converter handles opaque colors; add the alpha in CSS separately, e.g. rgba(26, 115, 232, 0.5).

How do I convert RGB back to HEX?

Divide each channel by 16: the quotient is the first digit, the remainder the second. rgb(26, 115, 232): 26 = 1x16 + 10, so 1A; 115 = 7x16 + 3, so 73; 232 = 14x16 + 8, so E8 - giving #1A73E8. Digits above 9 use letters (10=A through 15=F), which is the whole trick of base 16. The converter runs this exact math live when you type the RGB values.

Why do color pickers show both HEX and RGB?

They are the same three numbers in two notations, but different tools standardize on different ones: design handoffs and brand guides default to hex (compact, copy-paste safe), while CSS accepts either and animation tools often want rgb() so an alpha channel can ride along as rgba. Knowing the conversion means you are never stuck when a spec insists on the other form - paste either side and this page gives you both plus the swatch.

Related tools