HEX to RGB Converter
Convert HEX to RGB or type RGB channels to get a HEX code. Shorthand HEX and optional alpha are supported, with a preview that stays stable while you correct invalid input.
Enter a color
Accepted: #RGB, #RGBA, #RRGGBB, #RRGGBBAA.
Live preview and output
#7C41E1rgb(124, 65, 225)hsl(262, 73%, 57%)How to use it
- Type or paste a three-, four-, six-, or eight-digit HEX value.
- Or edit the RGB channels and optional alpha field from 0 to 1.
- Copy the normalized HEX, RGB/RGBA, or HSL result.
Practical uses
- Translate a design-system token between CSS formats.
- Inspect RGB channel values in a HEX color.
- Convert a transparent HEX color to CSS rgba().
Good to know: Alpha is shown in HEX as an 8-digit #RRGGBBAA value when below 1, rounded to the nearest 8-bit alpha step. HSL values are rounded for display, so converting that displayed HSL back may differ by a channel.
Frequently asked questions
Does #ABC work?
Yes. Each digit is repeated, so #ABC becomes #AABBCC.
What does the fourth or eighth HEX digit mean?
It is the alpha channel. #RGBA expands to #RRGGBBAA; 00 is fully transparent and FF is fully opaque.
Explore more color tools
Continue your workflow with another focused tool.
Image Color Picker
Pick an exact pixel color from an image and copy HEX, RGB, or HSL.
Color Palette Generator From Image
Extract, edit, preview, and export dominant colors from a photo.
Color Contrast Checker
Check WCAG text contrast and find a nearby passing foreground.
CSS Gradient Generator
Create linear, radial, and conic gradients with editable stops.