Hexadecimal color code for opacity LIVE EXAMPLE How to set opacity with hex value ? For example, you want to set 90% alpha opacity to #000000, you need to add E6 like this #000000E6 rgba(0, 0, 0, 0.7) => #000000B3 rgba(0, 0, 0, 0.9) => #000000E6