Convert a colour between HEX, RGB and HSL values, with a live preview swatch.
Try an example
Load a ready-made sample into this tool and run it. Every result you see is calculated live by the tool itself — nothing here is a pre-written answer.
Sample: input: #7C3AED
How to Use
- Enter a HEX, RGB or HSL colour.
- Click Run.
- Copy the converted values and check the swatch.
Convert between HEX, RGB and HSL
This color converter translates a color between the three formats web work uses most: HEX codes for stylesheets, RGB values for design tools, and HSL for adjusting lightness and saturation by feel. Enter a color in any one format and the tool returns the other two, alongside a live preview swatch so you can see exactly which color you are copying before you paste the values into your CSS or design file.
When this converter is the right fit
Use it when a brand guide gives you a HEX code but your tool asks for RGB, or when you want to lighten a color in a controlled way by editing its HSL lightness value. It handles one color at a time, which keeps the result unambiguous: no palettes, no guessing, just the matching values for the single color you entered.
Good to know
Three-digit HEX codes expand to six digits, so #73E and #7733EE are treated as the same color. If you type RGB or HSL numbers outside their valid ranges, the tool clamps them to the nearest valid value and shows a note, rather than failing or silently inventing a different color.
Frequently asked questions
Does it support CMYK or Pantone?
No. The converter handles HEX, RGB and HSL only, the formats screens and CSS use. Print work needing CMYK or spot colors requires a print-focused tool, and screen-to-print conversion is always approximate.
Why did my three-digit HEX code change?
The color did not change. Short HEX is shorthand where each digit doubles, so #73E expands to #7733EE, letting the tool show full RGB and HSL values. The swatch confirms the color is identical.
Is my color data sent anywhere?
No. Conversion runs entirely in your browser, and the value you enter is never sent to the site's server. Brand or client colors stay on your device, with nothing stored afterward.
How to use Color Converter
- Enter a HEX, RGB or HSL colour.
- Click Run.
- Copy the converted values and check the swatch.
Limitations
Three-digit HEX expands to six digits; out-of-range RGB or HSL values are clamped with a note.