CSS Color Code Converter
Enter a CSS color keyword and click Resolve to convert to HEX/RGB/HSL.
#3b82f6rgb(59, 130, 246)hsl(217, 91%, 60%)About this Tool
Stop juggling different color formats. Our CSS Color Code Converter is the only tool you need to instantly translate any color between HEX, RGB, and HSL. It fully supports alpha channels (transparency) and even recognizes CSS color names. It's the perfect companion for any developer or designer working on the web.
The converter takes your input, normalizes it into an RGBA (Red, Green, Blue, Alpha) format, and then uses standard color space formulas to calculate the equivalent values for HEX, HSL, and other formats. For CSS color names, it cleverly uses the browser to compute the exact RGB value.
- Enter a color in any of the formats (HEX, RGB, or HSL).
- All other formats will update instantly in real-time.
- Use the alpha slider to adjust the transparency.
- You can also type a CSS color name (like 'tomato') and click 'Resolve'.
- Click the 'Copy' button next to any format to grab the code.
- A developer converting a HEX color from a design file into RGBA to add transparency.
- A designer taking an HSL color and converting it to HEX for use in a style guide.
- Quickly finding the HEX code for a standard CSS color name like 'cornflowerblue'.
- Two-Way Sync: Edit any format, and all others update instantly.
- Full Alpha Support: Works with HEXA, RGBA, and HSLA for transparency.
- CSS Color Name Resolver: Converts names like 'rebeccapurple' to their codes.
- Live Preview: See your color with its current transparency.
- Error-Proof: Validates your input and provides clear error messages.
RGB, HSL, and HEX are different ways to represent colors in a digital space. RGB is based on mixing red, green, and blue light. HSL is a more intuitive model based on hue, saturation, and lightness. HEX is just a compact, hexadecimal representation of RGB. This tool provides the math to switch between them.
Does it support short HEX codes like #F0C?
Yes, it supports 3-digit (e.g., #F0C) and 4-digit (e.g., #F0C8) shorthand HEX codes and will convert them correctly.
What are CSS color keywords?
They are a set of 140+ standard color names (like 'tomato', 'skyblue', 'gold') that are built into CSS. Our tool can convert these names to their corresponding codes.
Is my data private?
Yes, all conversions happen locally in your browser. No data is ever sent to a server.
All calculations and data processing for this tool are performed locally in your browser. We do not send any of your data to our servers, ensuring your information remains private and secure.
Enjoying UtilToolkits?
Support our development and help us create more amazing tools!