Hex to RGB Converter

Convert between hex, RGB, HSL, and CMYK color formats instantly. Pick a color, paste a code, or type values directly. Everything runs in your browser.

🎨 Input Color
#
0% 100% 100%
R
G
B
0% 100% 100%
H (0-360)
S (0-100)
L (0-100)
0% 100% 100%
🌈 Color Output
#3B82F6
HEX #3B82F6
RGB rgb(59, 130, 246)
RGBA rgba(59, 130, 246, 1)
HSL hsl(217, 91%, 60%)
HSLA hsla(217, 91%, 60%, 1)
CMYK cmyk(76%, 47%, 0%, 4%)
HEX8 #3B82F6FF

Color Harmony

Complementary
Analogous
Triadic

Frequently Asked Questions

How do I convert a hex color code to RGB?

To convert hex to RGB, split the 6-digit hex code into three pairs (e.g., #3B82F6 becomes 3B, 82, F6), then convert each pair from hexadecimal to decimal. 3B = 59, 82 = 130, F6 = 246, giving you rgb(59, 130, 246). You can also paste any hex code into this converter for an instant result.

What is the difference between hex and RGB color formats?

Hex and RGB represent the same colors but use different notation. Hex uses a '#' followed by six hexadecimal characters (0-9, A-F), while RGB uses three decimal numbers from 0 to 255. For example, pure red is #FF0000 in hex and rgb(255, 0, 0) in RGB. Hex is more compact and commonly used in CSS, while RGB is often used in design tools and programming.

Can I convert RGB to hex color codes?

Yes. To convert RGB to hex, take each RGB value (0-255), convert it to a two-digit hexadecimal number, and concatenate them with a '#' prefix. For example, rgb(16, 185, 129) becomes #10B981. This converter handles both directions — hex to RGB and RGB to hex — along with HSL and CMYK conversions.

Embed this tool

<iframe src="https://devtoolbox.dedyn.io/tools/hex-rgb-converter" width="100%" height="700" frameborder="0" title="Hex to RGB Converter"></iframe>
Keyboard Shortcuts
Ctrl+Enter Convert
Ctrl+Shift+C Copy hex
Ctrl+L Clear