Hex Opacity Calculator
Convert an opacity percentage to its 2-digit hex alpha suffix for use in 8-digit CSS hex colors (#rrggbbaa).
How to use this tool
- Set the opacity percentage (0–100).
- Enter the base 6-digit hex color.
- Copy the 8-digit hex (e.g. #3a86ffcc) into your CSS.
Modern CSS supports 8-digit hex colors (#rrggbbaa) where the last two digits represent the alpha channel. This tool converts an opacity percentage to that hex byte.
Frequently asked questions
- What is an 8-digit hex color?
- #rrggbbaa where aa is the alpha channel: 00 = fully transparent, ff = fully opaque. Supported in CSS Color Level 4.
- Is 50% exactly 0x80?
- 50% × 255 = 127.5, which rounds to 128 = 0x80. The visual difference from 127 is imperceptible.