How This Tool Works
The Hex Opacity Converter maps an opacity percentage to the two-character alpha channel used at the end of an 8-digit CSS HEX color. Enter a value from 0% to 100% and the tool converts it to a value from 00 to FF.
The calculator uses round(opacity / 100 x 255), then formats the result as uppercase hexadecimal. Use the swap control to convert a HEX alpha value, such as 80, back to its approximate opacity percentage.
- Input: Opacity percent or two-digit HEX alpha.
- Formula: alpha = round(percent / 100 x 255).
- Output: CSS-ready alpha value, such as 40, 80, BF, or FF.