tools.now

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

  1. Type or paste a color, for example #1e90ff or rgb(30 144 255).
  2. Check the preview swatch.
  3. 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