Color Converter
Convert between HEX, RGB, HSL colors.
Color Converter is a a browser-based developer utility for common formatting, encoding, conversion, inspection, and debugging tasks.
Loading the interactive tool… This page needs JavaScript to run the Color Converter.
How to use Color Converter
- Paste the data, code, token, or value you need to inspect.
- Set any format, encoding, or validation options.
- Run the tool and inspect the result or diagnostic output.
- Copy the output into your terminal, editor, API client, or project.
How Color Converter works
Enter a color as a 3 or 6 digit hex code, with or without the hash, or as an rgb() or rgba() value. The tool lists the matching HEX, RGB and HSL notations, with HSL hue in degrees and saturation and lightness as whole percentages. The alpha value of rgba is ignored, and named colors such as red are not recognized. Invalid hex input shows a helpful error.
Worked example
Input: #3366ff → Output: HEX #3366ff, RGB rgb(51, 102, 255), HSL hsl(225, 100%, 60%).
Common uses
- Switch a brand color between the formats a stylesheet and a design tool expect.
- Find the HSL values to build lighter and darker shades of one color.
- Convert an rgb() value from a screenshot sampler into a hex code.
Best for
- developer workflows
- quick color converter tasks
- browser-based utility work
Tips for better results
- Validate the output before using it in production code.
- Treat tokens, credentials, and secrets as sensitive even when processing happens locally.
- For large payloads, keep an original copy so you can compare changes.
Frequently asked questions
How do I convert HEX to RGB?
Enter the HEX code and the RGB and HSL values appear instantly.
What is HSL?
Hue, saturation and lightness, a colour model that is easier to adjust by hand than RGB.
Does it support 3-digit HEX?
Yes, shorthand like #fff is expanded to #ffffff.
Related tools
- Hex ↔ Text Converter — Convert text to hex bytes and back.
- Number Base Converter — Convert between binary, octal, decimal, hex.
- RGB to HEX Converter — Convert RGB values to HEX and HSL with a color preview.
- Color Contrast Checker — Check WCAG color contrast ratios.
- Timestamp Converter — Convert Unix timestamps to readable dates.
- AI Token Cost Calculator — Estimate LLM API cost from tokens, requests and per-token prices.