HEX to RGB Converter

Convert HEX color codes to RGB values and vice versa.

No data leaves your device
Ad Space
Pick a color or enter values below

CSS Values

#2B6F8E
rgb(43, 111, 142)

How HEX to RGB Conversion Works

HEX colors use a six-digit hexadecimal string (#RRGGBB) where each pair represents the red, green, and blue channels. Values range from 00 (0) to FF (255).

RGB uses three decimal numbers (0–255) for each channel. For example, #2B6F8E breaks down to R:43, G:111, B:142.

Frequently Asked Questions

How do I convert HEX to RGB manually?

Split the 6-digit hex into 3 pairs (e.g., #FF8800 → FF, 88, 00), then convert each pair from base-16 to base-10: FF=255, 88=136, 00=0. The result is rgb(255, 136, 0).

What about 3-digit HEX codes?

Three-digit hex is shorthand where each digit doubles: #F80 = #FF8800. This converter handles both formats automatically.

When should I use HEX vs RGB?

HEX is more compact and popular in CSS. RGB is better when you need to manipulate individual channels programmatically or use rgba() for transparency.

Ad Space

Related Tools