Task Flow Hub
Home / Free tools / HEX, RGB and HSL Colour Converter

Colour converter (HEX, RGB, HSL)

Enter a colour in any of the three formats and get the other two, with a preview.

About this tool

Accepted input. HEX with 3 or 6 digits (with or without #), rgb(26, 43, 60) or 26 43 60, and hsl(210, 40%, 17%).

Rounding. RGB uses whole numbers 0 to 255 and HSL is rounded to whole degrees and percentages, so a round trip can differ by a small amount.

Validation. Values out of range show a message instead of a wrong colour.

Not included. Transparency (alpha), CMYK and named CSS colours are not handled.

Frequently asked questions

What is HSL?

Hue (position on the colour wheel, 0 to 360), saturation and lightness. Many people find it easier than RGB for making lighter or darker versions of a colour.

Why does my converted colour differ by 1 in one channel?

HSL values are rounded to whole numbers, which loses a little precision.

Can I check text contrast too?

Yes, see our colour contrast checker.

More free tools

Explore more free tools or see our services.