How the hex to RGB converter works
Enter a hex color code and the tool instantly shows the equivalent RGB and HSL values, with a live color swatch. It works both ways: change the red, green, and blue fields and the hex code updates to match. It is the quick reference for translating colors between the formats CSS and design tools use.
Hex, RGB, and HSL explained
A hex code like the one shown packs red, green, and blue into a six digit hexadecimal value, two digits each. RGB writes those same three channels as decimal numbers from 0 to 255. HSL describes color as hue, saturation, and lightness, which many designers find more intuitive for creating tints and shades.
Converting by hand
Each pair of hex digits is a number from 0 to 255 in base 16, so the conversion to RGB is a base conversion of each channel. Going from RGB to hex reverses it. HSL is derived from the RGB values with a standard formula. The tool does all of this for you and keeps every field in sync.
Using it in your work
Designers and developers use it to match a color from a mockup to CSS, to convert a brand color provided in one format into another, or to tweak a shade by editing HSL lightness. The swatch lets you confirm the color visually, and the copy button grabs the hex for pasting into your stylesheet.
Frequently asked questions
How do I convert hex to RGB? Split the six digit code into three pairs and read each as a base 16 number from 0 to 255.
Does it support shorthand hex? Yes, three digit codes are expanded automatically.
What is HSL? A color model using hue, saturation, and lightness, handy for making tints and shades.
Related tools: JSON Formatter, Base64, Password Generator.
