Free Hex to RGB Converter
Paste a HEX, RGB or HSL color and get the other formats at once, with a swatch and copy-ready CSS values.
That is not a color this tool can read. Try a hex code, rgb() or hsl().
Enter a color to convert it.
What is a Hex to RGB Converter?
A hex to RGB converter translates a web color from its hexadecimal code to separate red, green and blue values. Both describe the same color, in the notation a different tool expects.
This one works in every direction. Paste a hex code, an rgb() value or an hsl() value, or use the color picker, and every format updates together.
- Paste a color in any supported format, or choose one with the picker.
- Check the swatch to confirm it is the color you expected.
- Copy the format you need straight into your stylesheet or design tool.
Why Convert Colors?
- Add transparency: RGB with alpha is often the easiest way to get a see-through version of a brand color.
- Fit the tool: design apps, stylesheets and native code all prefer different notations.
- Adjust by eye: HSL makes a color lighter or darker by changing one number.
Color Formats This Tool Reads
Each of these can describe the same color. All of them work in modern CSS.
| Format | Looks like | What it is |
|---|---|---|
| Short hex | #f80 | Three digits, each one doubled, so #f80 means #ff8800. |
| Hex | #ff8800 | Two hex digits each for red, green and blue, from 00 to ff. |
| Hex with alpha | #ff880080 | Eight digits, where the last two set opacity. Here 80 is about 50 percent. |
| RGB | rgb(255, 136, 0) | Red, green and blue from 0 to 255, with an optional alpha between 0 and 1. |
| HSL | hsl(32, 100%, 50%) | Hue in degrees, then saturation and lightness as percentages. |
How to Read the Result
Every row is the same color, written differently.
HEX
CompactThe usual format for stylesheets and brand guides. Eight digits mean the color has transparency.
RGB
ChannelsThe amount of red, green and blue from 0 to 255, for tools that want separate numbers.
HSL
AdjustableRounded to whole numbers, so converting back can land a step away from the original.
Alpha
TransparencyShown only when the color is not fully opaque. 1 is solid and 0 is invisible.
How Screens Make Color
A screen mixes red, green and blue light. Web colors usually store each channel in 8 bits, a value from 0 to 255, which allows about 16.7 million combinations.
Hex and RGB are two spellings of those same three numbers. HSL rearranges them into hue, saturation and lightness, which is closer to how people think about color.
The Conversion, Step by Step
A hex code is three base-16 numbers. Split it into pairs and convert each pair to decimal.
For #7c3aed:
- Red 7c: 7 × 16 + 12 = 124.
- Green 3a: 3 × 16 + 10 = 58.
- Blue ed: 14 × 16 + 13 = 237.
Where Color Codes Trip People Up
The conversion is exact. The confusion lies in everything around it:
- Alpha is not the same in every format: hex uses 00 to ff, CSS rgb() uses 0 to 1, and some tools use a percentage.
- Android puts alpha first in its ARGB hex values, while CSS puts it last, so an eight-digit code can mean two different colors.
- The same code can look different across screens, because displays and color profiles vary.
- Print is a separate problem: RGB is for light on screens, and print uses CMYK, so a converted value is only an approximation.
- Sizing the images those colors sit on? The aspect ratio calculator keeps them in shape.
Why Conversion Comes Up So Often
Design handoff
A design file gives one notation and the codebase wants another.
Transparency
Overlays and shadows often need a brand color at partial opacity.
Design tokens
A color system stays consistent when values are converted exactly and never eyeballed.
Quick variations
Moving to HSL makes hover and disabled shades simple to work out.
Who Converts Color Codes
Anyone who moves a color between tools.
Related Tools
More utilities for building a site and a brand.
Show your logo in inboxes
Build the BIMI record that displays your brand mark in email.
BIMI generatorMonitor your domains
Get an alert when a domain's expiry, DNS or certificate changes.
See domain monitoringFrequently Asked Questions
Common questions about hex and RGB colors.
How do I convert hex to RGB?
Split the six digits into three pairs and convert each from base 16 to decimal. For example, ff becomes 255.
How do I convert RGB to hex?
Convert each channel to a two-digit base-16 number and join them. Paste an rgb() value above to do it instantly.
What does an eight-digit hex code mean?
The last two digits set opacity, from 00 for invisible to ff for solid.
What is a three-digit hex code?
A shorthand in which each digit is doubled, so #abc means #aabbcc.
Is hex or RGB better for CSS?
They are equivalent. Hex is shorter, while RGB is easier to read when you are working with transparency.
Why does HSL come back slightly different?
HSL is rounded to whole numbers for readability, so converting it back can shift a channel by a small amount.
Do I need to include the # sign?
No. The tool accepts a hex code with or without it.
Does this convert to CMYK?
No. CMYK depends on the printer and paper, so an exact conversion needs a color profile.
Start Monitoring & Catching Domains Today
Join founders, agencies, and domainers already protecting their portfolio. Your first 5 domains are free.
No credit card required • Cancel anytime
Guides for domain operators
Deep dives on domain names, DNS, SSL, acquisitions and portfolio management.
All guides →
4 Letter Domains: The Complete LLLL Investing Playbook
4 letter domain names represent one of the most liquid segments of the domain aftermarket. All 456,976 possible .com combinations are registered.
.SI Domain: Slovenia's 30-Year-Old ccTLD Is Suddenly Super Intelligence
What is the .SI domain? Learn how Slovenia's country-code TLD went from 10 registrations in 1992 to a 2,199% surge in September 2026, and why 'super intelligence' made .SI the new .AI.
Infringing Domains: Detecting, Monitoring, and Recovering
Your domain is your storefront. Every day, someone registers a lookalike of it, to skim your traffic, phish your customers, or hold it for ransom. This guide covers what infringing domains are, how to find them before they hurt you, and exactly what to do when you do.