File ConversionColor ConversionFree Tool
CSS Color Converter
Enter a color in HEX, rgb(), or hsl() format and get all three CSS notations back at once — auto-detects which format you entered.
How to Use CSS Color Converter
- 1Enter a color as hex, rgb(), or hsl()
- 2Click Convert
- 3Copy whichever format you need
Frequently Asked Questions
Hex codes (#4F46E5 or #F00), rgb()/rgba() functions, and hsl()/hsla() functions — it auto-detects which format you typed and converts to the other two.
No — only hex, rgb(), and hsl() notation are recognized; named CSS colors aren't parsed.
It shows a message asking for a valid hex, rgb(), or hsl() value rather than guessing or returning an incorrect result.
No — the parsing and conversion happen entirely in your browser.
Related Tools
HEX to RGB
Convert a HEX color code (#RRGGBB) to its exact RGB(r, g, b) equivalent using standard base-16 to base-10 conversion.
RGB to HEX
Convert RGB values (0-255 per channel) to a HEX color code (#RRGGBB) using standard base-10 to base-16 conversion.
HEX to HSL
Convert a HEX color code to HSL (Hue, Saturation, Lightness) using the standard RGB-to-HSL formula.
HSL to HEX
Convert HSL (Hue, Saturation, Lightness) values to a HEX color code using the standard HSL-to-RGB formula.