HEX and RGB describe the same colours in different notation. HEX (#3D34D6) is compact and common in design tools; RGB (rgb(61, 52, 214)) is easier to read and, as RGBA, lets you add transparency. Converting between them is a constant small task in web work.
What the HEX digits mean
A HEX colour is three pairs of characters: red, green, blue. #3D34D6 is 3D red, 34 green, D6 blue, each a value from 00 to FF (0 to 255 in decimal). So converting to RGB is really just reading each pair as a number — which the tool does instantly.
How to convert
- Open the color converter.
- Paste a HEX code to get RGB and HSL, or go the other way.
- Copy whichever format your CSS or design tool needs.
When to use which
Use HEX for solid colours where transparency is not needed — it is shorter. Reach for RGBA when you need see-through colour, like a semi-transparent overlay, since the fourth value sets opacity. HSL is the friendliest when you want to tweak a colour by hand, because you adjust hue, saturation and lightness directly.