RGB to HEX Color Converter
Enter a RGB color like rgb(79, 70, 229) to get its HEX value instantly, along with HSL and ready-to-paste CSS. A live swatch shows the color as you type.
Free · No sign-up · Files stay on your device
How to use RGB to HEX
- 1Enter the red, green and blue values (0–255), or paste rgb(…).
- 2Read the HEX value and the live color preview.
- 3Click copy next to the format you need.
Features
- Accepts 3, 4, 6 and 8-digit HEX codes
- Live color preview
- Shows HEX, RGB, RGBA and HSL at once
- One-click copy of each format
- Includes a visual color picker
HEX vs. RGB
Both describe the same colours. RGB lists the red, green and blue amounts from 0 to 255. HEX writes those same three numbers in hexadecimal, so rgb(255, 0, 0) is #FF0000. HEX is compact and common in design tools; RGB is easier to read and adjust.
Short HEX codes and transparency
A three-digit code like #F0C is shorthand for #FF00CC. Eight-digit codes like #4F46E580 add an alpha (transparency) channel, which converts to rgba().
Frequently asked questions
Do I need to include the # sign?
No. Both "4F46E5" and "#4F46E5" work.
What is HSL?
HSL describes colours by hue (0–360°), saturation and lightness. It is handy for making a colour lighter or darker while keeping the same hue.
Does it support transparency?
Yes. 4 and 8-digit HEX codes and rgba() values include an alpha channel.