HEX to RGB Converter

Type a HEX code or the three RGB values, and see the conversion to the other format instantly, with a live color preview and ready-to-copy code.

Enter HEX or RGB

RGB (red, green, blue)
Preview #0669BF
HEX #0669BF
RGB rgb(6, 105, 191)

Conversion happens entirely in your browser; no color value is sent to a server.

How the conversion works

A HEX code like #0669BF splits into three pairs of hexadecimal digits: 06, 69, and BF. Each pair is converted from base 16 to base 10, giving the three RGB values — 6, 105, and 191 — representing the intensity of red, green, and blue, each from 0 to 255.

When to use HEX vs. RGB

HEX is more compact and is the most common format in interface design and CSS code. RGB is more explicit and easier to tweak by hand, since each channel appears as a separate number — handy when you only need to adjust one of the three color components.

Frequently Asked Questions

What does each part of a HEX code mean?

A HEX code like #0669BF has 6 base-16 digits, split into 3 pairs: the first pair is red, the middle pair is green, and the last pair is blue — the exact same three values as RGB, just written in hexadecimal instead of decimal.

How does HEX relate to RGB?

They describe the exact same color information, just in different number bases: HEX uses base 16 (0 to F) and RGB uses base 10 (0 to 255) for each of the three color channels. That's why converting between them is a direct process with no loss of precision.

Are the color values I type sent to a server?

No. All conversion happens locally in your browser, without sending any value off your device.

What's the difference between this tool and the full Color Converter?

This tool focuses only on converting between HEX and RGB. The full Color Converter also includes the HSL format and a visual color picker.