Color Converter
Convert HEX, RGB or HSL into all three formats, with an on-page color preview. Optional alpha values are supported and each result can be copied separately.
Preparing your tool…
How to use it
- 01Enter a HEX, RGB or HSL color, such as #2f5bff or rgb(47, 91, 255).
- 02Select Convert color, or press Enter.
- 03Check the preview and copy HEX, RGB or HSL.
Equivalent formats can round differently
HEX, RGB and HSL describe color in different notations. The preview helps you check the intended value while the copied forms suit different design or code workflows. Optional alpha describes transparency, whose visible result also depends on the background.
Eight-bit channel and alpha values can introduce rounding when moving between notations. A color conversion does not guarantee contrast accessibility or a particular print appearance. Check the copied syntax and its rendered result in the destination.
Practical check: Cobalt-looking screen colors can have a different apparent contrast over white and navy backgrounds.
Useful details and limits
Accepted inputs include 3, 4, 6 and 8-digit HEX, numeric or percentage RGB, HSL hue in degrees and optional alpha as a fraction or percentage. Hue wraps around 360 degrees. RGB channels round to 8-bit values, HSL displays one decimal place and alpha displays three, so round trips can differ slightly. Named colors, CSS variables, wide-gamut spaces and CSS calc expressions are not accepted. This is a format conversion tool, not a contrast or color-management checker.
Questions about this tool
Can I convert a color with transparency?
Yes. Short and long HEX alpha, RGBA and HSLA are supported. Outputs include alpha when it is below 1.
Why do values change slightly after converting back?
RGB rounds to whole 8-bit channels, and HSL and alpha use display precision. Small rounding differences are expected.
Can I use a named CSS color or variable?
No. Enter a concrete HEX, RGB or HSL value.
Understand the workflow
- What “processed in your browser” actually means
Understand file picking, local processing, saved tool IDs and the practical limits of doing the work on your device.