Skip to main content

Hex to RGB Converter

Convert any hex color code to its RGB equivalent. Paste a hex value like #EFBF04 and get the red, green, and blue channel values instantly.

#EFBF04

Convert HEX to RGB

Format
HEX
#
RGB

rgb(239 191 4)

Also available in

CodeValueHTML/CSS
HSL48, 97, 48hsl(48 97% 48%)
HSV48, 98, 94
CMYK0, 20, 98, 6
OKLCH0.82, 0.17, 90oklch(0.82 0.17 90)

CMYK values are approximate. For production printing, use ICC profile-based conversion in your design software.

Use this color in Moda

Apply exact brand colors to slides, social posts, and other designs — all on a real canvas you control.

Try Moda free →

How to convert hex to RGB

A hex color code is a six-character string of hexadecimal digits (0–9, A–F), usually preceded by a # sign. Each pair of characters encodes one of the three RGB channels: the first two characters are red, the middle two are green, and the last two are blue. To convert, take each pair and convert it from base-16 to base-10. For example, in #3A7BFF, "3A" in hexadecimal equals 58 in decimal (3×16 + 10), "7B" equals 123, and "FF" equals 255. So #3A7BFF = RGB(58, 123, 255). Shorthand hex codes like #F80 expand to #FF8800 by doubling each character.

When to use hex vs RGB

Both hex and RGB represent the same set of colors — they are two notations for the same thing. Hex is more compact and is the most common format in CSS, brand guidelines, and design tools. RGB is useful when you need to manipulate individual color channels programmatically or when working with APIs and libraries that expect numeric values. In CSS, both rgb(58, 123, 255) and #3A7BFF produce identical results.

Worked example

Convert #EFBF04 to RGB: Split into pairs: EF, BF, 04. Convert each from hex to decimal: E=14, F=15 → 14×16+15 = 239. B=11, F=15 → 11×16+15 = 191. 0=0, 4=4 → 0×16+4 = 4. Result: RGB(239, 191, 4) — a warm gold color.

Frequently asked questions

How do I convert hex to RGB?

A hex color code is made up of three pairs of hexadecimal digits. Each pair represents one of the three RGB channels: red, green, and blue. For example, #EFBF04 breaks down to EF (239 red), BF (191 green), and 04 (4 blue).

What is the difference between hex and RGB?

Both hex and RGB represent the same colors. Hex is a compact hexadecimal notation (e.g., #FF0000), while RGB spells out the decimal red, green, and blue values (e.g., 255, 0, 0). They are interchangeable.

Is #000000 the same as RGB(0, 0, 0)?

Yes. Both represent pure black — zero intensity in all three color channels.

← All tools