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.
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
rgba() — something a plain HEX code cannot express in older code.Design Tools
Code & Math
How to Convert HEX to RGB
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.
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.
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.
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
| Aspect | HEX | RGB |
|---|---|---|
| Looks like | #3B82F6 | rgb(59, 130, 246) |
| Number base | Base-16 (hexadecimal) | Base-10 (decimal) |
| Per channel | 00–FF | 0–255 |
| Transparency | 8-digit #RRGGBBAA | rgba() alpha |
| Best for | Compact CSS / sharing | Code & calculations |
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.
No comments yet. Be the first to comment!