HEX to RGB Converter
Convert HEX colours to RGB and HSL — and back.
#4f46e9 is rgb(79, 70, 233) — each hex pair is one colour channel in base 16. Designers think in HEX, CSS animations often need RGB/RGBA, and HSL is the most intuitive for tweaking (‘make it lighter’ = raise L).
How to use the hex to rgb converter
- Enter a colour in any format.
- See HEX, RGB and HSL together.
- Copy the format you need.
HEX to RGB Converter — FAQs
How does HEX work?
Six hex digits = three bytes: red, green, blue. #FF0000 is pure red (255,0,0); #FFFFFF is white.
What’s the 3-digit shorthand?
#abc expands to #aabbcc. Only works when each pair repeats.
When should I use HSL?
When adjusting colours by feel: H picks the hue, S the vividness, L the lightness. ‘Slightly darker blue’ is one L tweak away.
How do I add transparency?
Use RGBA or 8-digit HEX (#4f46e980 = 50% opacity). The last two digits are the alpha channel.
Keep exploring
People who used this also opened:
Color Palette Generator →
Generate harmonious colour palettes from any base colour.
devContrast Checker →
Check text contrast ratios against WCAG accessibility standards.
devPX to REM Converter →
Convert px to rem (and back) for accessible, responsive CSS.
devBase64 Encoder / Decoder →
Encode and decode Base64 — for tokens, images and data URIs.