Convert color from HEX to RGB

HEX to RGB converter

Turn a HEX color code into RGB values.

Example: #ff6b35

RGB
See this color in all formats

About HEX to RGB Converter

Brand guides and design files hand you HEX codes, but plenty of tools want separate red, green and blue numbers: canvas and WebGL code, game engines, video editors and some Office or email settings. This is a straight re-spelling, since each pair of hex digits becomes one decimal number from 0 to 255, so nothing is lost.

About the formats. A HEX code writes the red, green and blue channels as two hexadecimal digits each, so #ff6b35 is red ff (255), green 6b (107) and blue 35 (53). The leading # is optional here, the short forms #f63 and #f63a work, and the 8-digit form #RRGGBBAA adds transparency. RGB gives the amount of red, green and blue light as three numbers from 0 to 255, as in rgb(255, 107, 53). Both the comma form and the space form rgb(255 107 53 / 50%) are read, and percentages work too.

How exact is it? HEX holds a whole number from 0 to 255 per channel, so every code maps to exactly one color and nothing has to be rounded on the way in. The channels come out as whole numbers from 0 to 255, and a partly transparent color is written as rgba().

For example, #ff6b35 in HEX is rgb(255, 107, 53) in RGB. Transparency comes through as well: an 8-digit code like #ff6b3580 becomes rgba(255, 107, 53, 0.502). Three-digit shorthand such as #f63 works too, because each digit is doubled first, giving rgb(255, 102, 51).

How to convert HEX to RGB

  1. Type or paste a HEX color code, such as #ff6b35, or choose a color with the picker.
  2. The RGB value, rgb(255, 107, 53) for that example, appears straight away.
  3. Press Copy to put the RGB value on your clipboard.
  4. Use the From and To menus at the top to switch to a different conversion, or open the all-formats page to see every format at once.

Frequently asked questions

How do I convert HEX to RGB?

Type or paste a HEX value such as #ff6b35 and the RGB value, rgb(255, 107, 53), appears straight away. Use Copy to put it on your clipboard, or choose a color with the picker.

What does each part of a HEX code mean?

The six digits are three pairs: red, green and blue. In #ff6b35, ff is 255 red, 6b is 107 green and 35 is 53 blue. Each pair is a base-16 number from 00 (0) to ff (255).

Does it work with 3-digit HEX codes?

Yes. #f63 is read as #ff6633 before converting, so it becomes rgb(255, 102, 51). The # at the start is optional.

Is converting HEX to RGB exact?

HEX holds a whole number from 0 to 255 per channel, so every code maps to exactly one color and nothing has to be rounded on the way in. The channels come out as whole numbers from 0 to 255, and a partly transparent color is written as rgba().

Does HEX to RGB keep transparency?

Yes. Add transparency to the HEX value and it is carried over to the RGB result, which supports it too.

Are my colors sent anywhere?

No. The conversion runs in your browser and nothing is uploaded.