Paste a color in HEX, RGB, or HSL and get all three formats with a live preview swatch — the everyday conversion in CSS and design work.
How it works
- Paste a color value into the search box in any format (e.g., #FFFFFF or rgb(255, 255, 255)).
- The engine parses the format and visually displays a color swatch.
- Copy the exact matching HEX, RGB, or HSL strings for your CSS.
Frequently asked questions
When is it best to use the HSL format?
HSL is perfect for designing systemic themes. You can easily vary the Lightness channel for hover states while keeping the Hue intact, which is mathematically awkward with HEX.
Does a 3-digit HEX like #FFF equal #FFFFFF?
Yes. In CSS, a 3-digit HEX simply doubles each character to form the 6-digit equivalent. This tool accepts both.
What about alpha channel transparency?
This tool converts opaque colors. For alpha transparency, append the decimal after converting: rgba(..., 0.5) or use an 8-digit HEX code.