Runs locally
$ devdesk color--local
Encode & convert

Color converter: HEX, RGB, HSL and alpha

Convert CSS names, HEX, RGB and HSL with alpha-aware sRGB output and a color swatch. Explore transparent colors and representation differences.

Loading local tool…

How to use

Accepts CSS color names, HEX, RGB and HSL. Output is converted to sRGB with alpha preserved.

Your input stays yours

Step by step

  1. Enter a CSS color such as #ff000080, rgb(255 0 0) or red.
  2. Choose Convert to see HEX, RGB and HSL representations.
  3. Check alpha and verify the result against the actual background.

Example: translucent red

#ff000080

The last two digits of eight-digit HEX encode alpha. 80 is about 50.2%, not exactly 50%. Output preserves that alpha value.

Frequently asked questions

Why does a color look different on another background?

A translucent color blends with its background. Compare the color, alpha and background together rather than only the HEX string.

Are wide-gamut colors preserved exactly?

Output is converted to sRGB and values outside its range are clipped. Out-of-gamut colors may change; this is not a lossless color-management tool.

Does this check text contrast?

It currently converts formats and previews a swatch. It does not calculate foreground/background contrast or determine accessibility conformance.