About this tool
Three notations, one colour. HEX is RGB in a trench coat — three pairs of hexadecimal numbers for red, green and blue. RGB states the same channels in decimal. HSL describes the colour the way humans do: hue around the wheel, saturation from grey to vivid, lightness from black to white. Converting between them is arithmetic, and this tool does it in both directions with a swatch so your eyes can audit the maths.
HSL is where this converter earns its keep beyond arithmetic: it is the practical notation for building colour systems. Keep hue and saturation fixed and walk lightness up and down, and you have a coherent palette of tints and shades for hover states, borders and backgrounds — the trick every design system uses, available to anyone who can read three numbers.
How to use it
- Enter a HEX value (or pick a colour), and convert to see RGB and HSL.
- Or enter HSL values and convert to get the matching HEX and RGB.
- Copy the notation your stylesheet, design tool or brand doc needs.
Good to know
- Short HEX (#fff) is expanded automatically; alpha channels are not handled — this is a three-notation converter for solid colours.
- For a darker shade of any colour, convert to HSL and subtract 10 from lightness; for a tint, add 10.
- Check text colours for contrast separately — a beautiful colour can still be unreadable at small sizes.
Frequently asked questions
Why does my colour look different on another screen?
Conversion is exact; displays are not. Different screens render the same numbers with different brightness and gamut — the numbers are the portable truth.
What about RGBA and HSLA with transparency?
This converter covers the opaque notations. Transparency is an extra channel your design tool can layer on top of the converted base colour.
Is anything uploaded?
No — the maths runs in your browser.
More Developer tools
JSON Formatter & Validator
Pretty-print messy JSON, minify it back, and get a precise error location when it will not parse.
JSON to CSV
Turn a JSON array of objects into a clean spreadsheet-ready CSV, columns and escaping handled.
CSV to JSON
Convert spreadsheet CSV into a JSON array — quoted fields, embedded commas and all.
XML Formatter
Indent and validate XML — sitemaps, feeds, config files — with errors pointed at the guilty tag.
JS / CSS / HTML Beautifier
Untangle minified or messy code into readable, consistently indented JavaScript, CSS or HTML.
JS / CSS Minifier
Strip comments and needless whitespace from JavaScript and CSS — smaller files, same behaviour.
Making videos too? Try our YouTube SEO Checker, or browse the full Toolkit and the free YouTube tools.