What the Color Converter does
This page converts a single colour between the three formats a stylesheet or design tool usually speaks: HEX, RGB and HSL. You pick which format you are typing in, enter one value, and the other two appear at once alongside a live square preview of the colour. There is no convert button, because every keystroke that parses correctly redraws the result immediately.
Enter #ff6600 in HEX mode and it comes back as RGB 255, 102, 0 and HSL 24, 100%, 50%, with an orange swatch beside the input. Designers use it to move a brand colour between a design file and a stylesheet, to find out what hue and lightness a shade is really built from, or to grab an arbitrary colour for a placeholder block.
How to use it
- Pick the input formatClick the HEX, RGB or HSL button at the top. The label above the text box changes with it, telling you the shape the value needs to take.
- Type the colour valueEnter a hash colour, three comma-separated channel numbers, or a hue with saturation and lightness percentages, depending on which input button is active at the top of the page.
- Check the preview squareThe small box beside the input fills with the parsed colour straight away. If it goes blank, the text was not in a shape the parser recognises.
- Read the format you needAll three lines are rewritten on every change, so copy the HEX, RGB or HSL line depending on what the target file or tool expects.
Options and formats
Things to watch out for
Frequently asked questions
Do I need to include the hash in HEX mode?
No, six or three hex digits on their own are read as a colour and the hash is added for you. Letters can be upper or lower case, so FF6600 and ff6600 produce the same result, and a leading hash is equally acceptable if you are pasting from a stylesheet.
Why did my colour shift slightly after converting?
Hue is stored as whole degrees and saturation and lightness as whole percents in both directions. A colour that does not sit exactly on those values loses a fraction each time it passes through HSL, which is invisible on screen but can show up if you are comparing hex codes.
Can I type a colour name like tomato?
No, only numeric values are parsed: hex digits, an RGB triple, or an HSL triple. Words, CSS custom properties and function notation such as rgb() or hsl() are all treated as invalid, and the preview clears until the text is in a recognised shape.
How does the random button choose colours?
It draws red, green and blue independently, so every colour in the cube is equally likely. That means a lot of muddy mid-tones and very few colours that work together, which is fine for a placeholder fill but useless for building a palette.
What is the preview square actually showing?
It shows the colour the parser built from your input, not an approximation of your text. When a value converts into something other than what you expected, the swatch is the clearest evidence, and a blank square means nothing was parsed at all.
Can I convert a whole palette at once?
No, the page holds one colour at a time and each conversion replaces the last. Working through a palette means entering values one by one and noting the output, so a batch job really needs a script rather than this page.