Color converter

Convert HEX, RGB, HSL and alpha with a preview.

Processed only in this browser

Enter HEX, RGB or HSL to see equivalent values and a transparency preview.

Inputs and settings
Examples

Supports #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb() and hsl().

Inputs and results are processed in this tab. Reloading or closing clears them; files you choose to save remain on your device.

How to use this tool

  1. Enter a supported color string or use the adjacent color picker.
  2. Compare HEX, RGB and HSL results, including opacity.
  3. Copy an individual row or save the complete conversion as TXT or JSON.

Compare translucent red notation

Input and settings
rgb(255 0 0 / 50%)
Result
RGB alpha 0.5; HEX #FF000080

HEX alpha uses 256 levels, so 50% is rounded to its nearest 8-bit value.

Supported input notation

Both short #RGB/#RGBA and long #RRGGBB/#RRGGBBAA forms are accepted. RGB and HSL functions support comma syntax and space/slash syntax. HSL saturation and lightness require percent signs; hue supports degrees, turns or radians.

RGB channels use 0–255 numbers or percentages, and alpha uses 0–1 or 0–100%. Out-of-range values are rejected rather than silently clamped, making an invalid input visible.

Transparency and color-space limits

The checkerboard is a visual aid and is not part of the color value. Moving the native color picker replaces the text with an opaque HEX color; re-enter alpha in the text field if you need transparency.

Channels are converted to 8-bit sRGB integers and HSL display values are rounded. Display P3, Lab, OKLCH, CMYK, spot colors and profile conversion are not supported. An on-screen swatch does not establish an exact print match.

Common questions

What is the last digit in #RGBA?

It is alpha. Each short digit is doubled into an 8-bit channel, so #f008 expands to #ff000088.

Are all named CSS colors supported?

No. Only a small set of basic names is recognized; use HEX, RGB or HSL for an explicit conversion.

Standards and references

Read alongside this tool