What this tool does
Lets you choose a web color visually or enter HEX, RGB or HSL, with synchronized alpha-aware formats and previews against light and dark backgrounds.
How to use it
- Use the visual picker or enter HEX, comma-separated RGB(A) or HSL(A).
- Set opacity and check both backgrounds; each valid input updates the other formats.
- Copy CSS-ready output, or save a few recent colors in this tab.
Worked example
#FF0000 becomes rgba(255, 0, 0, 1) and hsla(0, 100%, 50%, 1). At 50% opacity its HEX8 form is #FF000080; one-byte alpha represents approximately 50.196% rather than exactly 50%.
Processing and explanation
HEX encodes red, green and blue as bytes, with an optional final alpha byte. HSL expresses hue in degrees, saturation and lightness as percentages. Conversions use the same sRGB channel values; the previews show normal alpha blending against their background colors. Invalid input leaves the last valid preview available.
Limits and common mistakes
Accepts 3/4/6/8 HEX digits, integer RGB 0–255, hue 0–360, saturation/lightness 0–100% and alpha 0–1. Uses comma-separated CSS function syntax, not modern space/slash syntax, RGB percentages, HSV, CMYK, color profiles or wide-gamut spaces. HSL is rounded to four decimal places and HEX8 rounds alpha to a byte. These previews do not measure WCAG contrast.
Privacy and your input
Color conversion runs locally. Up to eight recent colors live in tab memory only, disappear on reload, and are not uploaded or put in persistent storage.
Frequently asked questions
- Why does alpha change slightly in HEX8?
- HEX8 has only 256 alpha levels; a fractional opacity must be rounded to the nearest byte.
- Can I paste rgba or hsla?
- Yes. Use comma-separated channels, with percent signs for HSL saturation and lightness.
- Are recent colors saved across visits?
- No. They are temporary values within this open tab.
Material content update: