Color Converter
Enter a color in HEX, rgb() or hsl() to get every other format and a preview swatch. Alpha transparency is supported.
Output
π Runs in your browser. Your data is never uploaded.
How to use
- Type or paste a color, for example #1e90ff or rgb(30 144 255).
- Check the preview swatch.
- Copy the format you need.
Which format to use in CSS
HEX is the most compact. HSL is the easiest to adjust by hand: change lightness for a hover state or saturation for a muted variant without touching the hue.
Frequently asked questions
- What is an 8-digit hex color?
- The last two digits are the alpha channel: #1e90ff80 is the same blue at 50% opacity. All current browsers support it.
- Why do HSL values change slightly after a round trip?
- HSL values are rounded to whole numbers, so converting back to RGB can differ by one step in a channel. The difference is not visible.
- What is the difference between HSL and HSV?
- Both describe hue and saturation. HSL's lightness goes from black through the pure color to white; HSV's value goes from black to the pure color. Design tools usually show HSV (also called HSB), CSS uses HSL.
Related tools
- Image ConverterConvert images between WebP, JPG and PNG in your browser.
- QR Code GeneratorCreate a QR code for a URL or text and download it as PNG or SVG.
- Hash Generator (SHA-256, SHA-512, SHA-1)Generate SHA-256, SHA-512, SHA-384 or SHA-1 hashes of text in your browser using the Web Crypto API.
- Case ConverterConvert text between UPPER CASE, lower case, Title Case, Sentence case, camelCase, PascalCase, snake_case and kebab-case instantly.