🍋 CSS Tools
CSS Color Converter
Convert colors between hex, RGB, HSL, HWB, and named CSS colors
chars
words
sentences
lines
Results
Result
About CSS Color Converter
Parse any CSS color format and convert to all other formats. Includes WCAG contrast checks and luminance analysis.
Step by Step
- 1 Enter a color in any format (hex, rgb, hsl, or named color)
- 2 View all equivalent color format representations
- 3 Check WCAG contrast ratios against white and black
- 4 Copy the format you need for your CSS
Tips
- HSL is the most intuitive format for adjusting colors — H is hue, S is saturation, L is lightness
- Use 8-digit hex (#RRGGBBAA) for colors with transparency
- HWB (Hue, Whiteness, Blackness) is a newer CSS format that's very readable
- Check WCAG contrast before using colors for text — aim for 4.5:1 ratio
Frequently Asked Questions
What WCAG contrast ratio is required?
WCAG 2.1 requires 4.5:1 for normal text (AA level) and 7:1 for AAA. Large text (18px+ bold or 24px+) only needs 3:1 for AA.
What is the HWB color format?
HWB stands for Hue, Whiteness, Blackness. It describes colors by how much white and black are mixed with a pure hue. It's supported in all modern browsers since 2022.