HEX RGB Converter Calculator

In web and design work, colors are expressed as HEX codes (#RRGGBB) or RGB values (red, green, blue, each 0–255). The two notations represent the same color in different ways, so they are interchangeable.

Enter a HEX code to instantly convert it to RGB, or enter RGB values to get the HEX code. Useful for writing CSS styles or preparing design mockups.

For example, #3B82F6 is the same color as rgb(59, 130, 246).

HEX → RGB

RGB → HEX

About This Calculator

Hexadecimal colour codes and RGB values describe the same colour: hex packs the red, green and blue channels into a single six-digit value, while RGB lists them as three numbers from 0 to 255.

Enter a hex code to get its RGB and HSL equivalents, or enter RGB values to get the hex code.

Hex and RGB describe the same colour in different notation: #FF8800 is rgb(255, 136, 0), a bright orange. Each pair of hex digits is one channel in base 16, so FF is 255, 80 is 128 and 00 is 0. Eight-digit hex adds alpha, where #FF880080 is the same orange at about half opacity.

Key Formula:#RRGGBB ⟷ rgb(r, g, b)

Frequently Asked Questions

What do the six digits in a hex colour mean?

The first two digits are red, the next two green and the last two blue, each in base 16. For example #FF8800 means 255 red, 136 green and 0 blue, a bright orange.

How do I make a colour transparent in CSS?

Add an alpha channel: eight-digit hex (#RRGGBBAA) or rgba(r, g, b, a) where a is 0 (fully transparent) to 1 (opaque). Older browsers only support the rgba() form.

How do I convert a hex channel by hand?

Multiply the first digit by 16 and add the second: 8A is 8 × 16 + 10 = 138. For shorthand notation such as #F80, double each digit first, which gives #FF8800.

Why do design tools also show HSL?

HSL matches how people describe colour — hue, saturation, lightness — which makes building a consistent palette easier. RGB and hex are better for exact reproduction and for code.

Sources & last update

2026-10-19