HEX to RGB Converter

Turn a HEX color code (#3B82F6) into RGB (59, 130, 246). The R, G and B numbers PowerPoint asks for can each be copied on their own.

Your input stays in your browser and is never sent.

Enter a HEX code such as #3B82F6, 3B82F6 or #38F.

Click to copy. In PowerPoint's RGB fields, use the form without # or brackets.

What the HEX to RGB converter does

It turns a hex color code such as #3B82F6 into RGB: red, green and blue as numbers from 0 to 255, here 59, 130, 246. A code from a brand guide or a website becomes numbers you can enter in PowerPoint's or Excel's color dialog.

Codes without the hash, the three-character shorthand (#38F) and eight-character codes with opacity are all read. The result comes as rgb(), as bare numbers, and as red, green and blue on separate rows you can copy one by one.

Convert a hex code to RGB in three steps

  1. EnterPaste your hex code into the "Paste a HEX color code, or pick a color" box. #3B82F6 and 3b82f6 both work.
  2. See the resultThe RGB value and each of the red, green and blue numbers appear under "Converted to RGB" straight away.
  3. CopyClick "RGB (CSS)" for CSS, or "R (red)", "G (green)" and "B (blue)" for PowerPoint, then paste where you need it.

How hex to RGB conversion works

A six-character hex code is three pairs (red, green and blue), each written in hexadecimal. A pair turns back into a decimal number as first digit × 16 + second digit, with A to F standing for 10 to 15.

For #3B82F6: 3B is 3 × 16 + 11 = 59, 82 is 8 × 16 + 2 = 130 and F6 is 15 × 16 + 6 = 246, so the RGB value is (59, 130, 246). The shorthand #38F doubles each character to #3388FF, which is (51, 136, 255).

Entering a hex color as RGB numbers in PowerPoint or Excel

The color dialog in PowerPoint, Word and Excel (More Colors) has separate boxes for red, green and blue. To match a hex color from your website or Canva, enter its RGB numbers there.

59, 130, 246 cannot go into a single box, so this converter puts red, green and blue on separate rows. Copy them in order and paste each into its box.

Convert an eight-character hex code to RGBA

In an eight-character code such as #3B82F680, the last two characters are the opacity. 80 is 128 in decimal, about half of 255, so the result is rgba(59, 130, 246, 0.5).

To use a semi-transparent color in PowerPoint, set the color with the red, green and blue numbers, then set how see-through it is with the Transparency slider in the color dialog.

HEX to RGB converter FAQ

How do you convert HEX to RGB by hand?
Split the six characters into three pairs and convert each pair from hexadecimal to decimal. In #3B82F6, 3B is 3 × 16 + 11 = 59, 82 is 8 × 16 + 2 = 130 and F6 is 15 × 16 + 6 = 246, so the RGB value is (59, 130, 246). The letters A to F stand for 10 to 15.
How do I use a hex color in PowerPoint's color dialog?
The dialog has separate boxes for red, green and blue. Paste the hex code above, then copy the "R (red)", "G (green)" and "B (blue)" rows in turn and paste each into its box.
Does it handle three-character hex codes like #38F?
Yes. Each character is doubled, so #38F is read as #3388FF and becomes RGB (51, 136, 255). Eight-character codes are read with the last two characters as opacity and come out as rgba().
Do I need the # in front?
No. 3B82F6 without the hash works too, in upper or lower case.
How do I convert RGB to a hex code instead?
Use "Convert RGB to HEX" under "Other conversions". Enter the red, green and blue numbers and it gives you the code with and without the hash. If you want HSL as well, use "Convert HEX, RGB and HSL together".
Is the color I enter sent anywhere?
No. The conversion runs entirely in your browser and the value never leaves it. There is no sign-up, no login and no usage limit.