HEX转RGBA转换器
在浏览器中处理或呈现HEX转RGBA转换。
使用步骤
如何使用
- Enter a 3, 4, 6, or 8 digit HEX color with or without the # prefix.
- Keep the input alpha or turn on the opacity override and inspect the color preview.
- Copy the normalized RGBA value or a CSS color declaration.
Four practical HEX lengths
The converter accepts shorthand RGB (#RGB), shorthand RGBA (#RGBA), full RGB (#RRGGBB), and full RGBA (#RRGGBBAA). The # prefix is optional. Shorthand digits are doubled, so #3af becomes #33aaff and #3af8 becomes #33aaff88.
Alpha is explicit and normalized
Six digit colors start fully opaque; eight and four digit colors carry an alpha channel. Use the opacity override when you need a deliberate output alpha regardless of the input. RGBA output uses a 0–1 alpha value rounded to three decimal places.
Browser color space
HEX and rgba() describe sRGB channel values. This tool converts the channel notation only; it does not perform color management, wide-gamut conversion, perceptual interpolation, or display-profile conversion. The preview is rendered by the current browser.
常见问题
你可能还想知道
Does the converter accept CSS color names or rgb() values?
No. It is focused on four HEX forms: 3, 4, 6, or 8 hexadecimal digits, with an optional # prefix.
What does the last pair in an 8 digit HEX mean?
The final two digits are the alpha channel. 00 is fully transparent and FF is fully opaque.
Why does #RGBA use four digits?
The four digit form is shorthand RGBA: each digit is doubled, so #abcd expands to #aabbccdd.
Is this a color profile converter?
No. It converts sRGB-style HEX channel notation to RGBA and CSS syntax. It does not convert between ICC profiles or color spaces.