Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
HEX to RGB Converter

HEX to RGB Converter

Convert HEX color codes to RGB values instantly. Supports 3-digit and 6-digit HEX formats.

HEX to RGB Converter

The HEX to RGB converter turns hexadecimal color codes like #3B82F6 into RGB values like rgb(59, 130, 246). HEX is the most common way to write colors in CSS and HTML, while RGB is the underlying additive model your screen actually uses to mix red, green, and blue light.

A HEX code is simply RGB written in base-16. Each pair of characters — 3B, 82, F6 — is one channel value from 0 to 255, just expressed in hexadecimal instead of decimal.

When You Need It

CSS with Alpha

Convert a HEX value to RGB so you can add transparency with rgba() — something a plain HEX code cannot express in older code.

Design Tools

Many graphics apps, canvas APIs, and SVG fills expect numeric RGB channels rather than a hash string.

Code & Math

Get separate R, G, B integers for calculations like blending, brightness checks, or contrast ratios.

How to Convert HEX to RGB

1

Enter the HEX Code

Type or paste your HEX value into the input field — with or without the leading #. Both 3-digit shorthand (#F00) and full 6-digit (#FF0000) formats are accepted.

2

Read the RGB Output

The RGB value is calculated instantly as you type — no button to press. The large swatch updates so you can verify the color visually.

3

Or Pick a Color

Click the preview swatch to open the native color picker and choose any color visually — the HEX and RGB fields fill in automatically.

4

Copy & Reuse

Hit the copy button to put the RGB string on your clipboard. The panel below also lists every other format — HEX, HSL, HSV, and CMYK.

Features

Instant Conversion

Results update in real time as you type — fully client-side, with no page reloads or server round-trips.

Shorthand Support

3-digit codes are auto-expanded (#F00#FF0000), and input is case-insensitive.

Visual Preview & Picker

A live swatch confirms the color, and the built-in picker lets you choose one visually.

All Formats at Once

Every conversion also shows HEX, RGB, HSL, HSV, and CMYK so you never need a second tool.

HEX vs RGB at a Glance

AspectHEXRGB
Looks like#3B82F6rgb(59, 130, 246)
Number baseBase-16 (hexadecimal)Base-10 (decimal)
Per channel00–FF0–255
Transparency8-digit #RRGGBBAArgba() alpha
Best forCompact CSS / sharingCode & calculations
Private by design: all conversion runs in your browser. No colors or data are ever sent to a server.

Frequently Asked Questions

What is a HEX color code?

A HEX code is a 6-character hexadecimal string (plus an optional #) that encodes a color. The three pairs represent Red, Green, and Blue, each from 00 to FF — equivalent to 0–255 in decimal.

What is RGB color?

RGB is an additive color model that defines a color by the intensity of three light channels — Red, Green, and Blue — each from 0 to 255. It is how displays physically produce color.

Can I use 3-digit HEX codes?

Yes. Shorthand codes like #F00 are automatically expanded by doubling each digit, so #F00 becomes #FF0000 before conversion.

Do I need to include the # symbol?

No. The converter accepts the HEX value with or without the leading #, and it ignores letter case — ff0000 and FF0000 give the same result.

How do I add transparency to a converted color?

Once you have the RGB channels, wrap them in CSS rgba() and add an alpha value from 0 to 1 — for example rgba(59, 130, 246, 0.5) for 50% opacity.

Click to pick
rgb(59, 130, 246)
Click to pick
#3B82F6
Click to pick
hsl(217, 91%, 60%)
Click to pick
#3B82F6
Click to pick
hsl(217, 91%, 60%)
Click to pick
cmyk(76%, 47%, 0%, 4%)
Enter HEX with or without # prefix
Supports 3-digit shorthand (e.g., #F00 = #FF0000)
Case insensitive (ff0000 = FF0000)
Want to learn more? Read documentation →
1/4
Can't find it? Build your own tool with AI
Start typing to search...
Searching...
No results found
Try searching with different keywords