Developer

HEX Opacity Calculator

Add transparency to any color and get 8-digit HEX, RGBA, and HSLA values instantly.

Developer

Why Use the HEX Opacity Calculator?

Adding transparency to a HEX code means appending two extra hex digits, and this HEX opacity calculator works them out for you from a simple percentage slider. Set a base color and an opacity, and you get the 8-digit #RRGGBBAA code plus matching rgba() and hsla() values, previewed over a checkerboard so you can see exactly how see-through the result is. A reference table of alpha suffixes from 100% down to 0% in 10% steps sits alongside for quick lookups.

How to Use the HEX Opacity Calculator

  1. Enter the base color with the picker or type a HEX, rgb(), hsl() or CSS color name value into the text box.
  2. Drag the opacity slider between 0% and 100% and watch the checkerboard preview show through as the color becomes more transparent.
  3. Click Copy next to the 8-digit HEX, rgba() or hsla() output, depending on which format your project uses.
  4. Use the alpha suffix table to find the two-digit code for common values such as 80% or 50% and add it to any other six-digit HEX code.

Best For

  • Creating a semi-transparent dark overlay so white headline text stays readable on top of a hero photo.
  • Defining hover and pressed background tints for buttons and list rows from a single brand color.
  • Translating an opacity value from a design file into an 8-digit HEX code a developer can paste into CSS.
  • Building subtle tinted borders, dividers and focus rings that blend with whatever background sits behind them.

Pro Tip

When you only want a background to be see-through, use an alpha color like rgba() or 8-digit HEX on that background instead of the CSS opacity property. The opacity property fades the whole element, including its text, icons and child elements, while an alpha color affects only that one paint layer. For HTML email, prefer rgba() or a solid fallback color, because support for 8-digit HEX varies across email clients.

FAQ

HEX Opacity Calculator FAQ

How do I add opacity to a HEX color?

Add two hex digits to the end of a six-digit code to form #RRGGBBAA, where the last pair is the alpha channel. FF is fully opaque, 00 is fully transparent and 80 is about 50%. For example, #3366FF80 is the color #3366FF at roughly half opacity.

What is 50% opacity in HEX?

The hex alpha for 50% is 80. Alpha runs from 0 to 255, half of 255 is 127.5, which rounds to 128, and 128 in hexadecimal is 80. Other common values are CC for 80%, B3 for 70%, 99 for 60%, 66 for 40%, 33 for 20% and 1A for 10%.

How is the HEX alpha value calculated?

Multiply the opacity as a decimal by 255, round to the nearest whole number, then convert that number to two-digit hexadecimal. For 75%, 0.75 times 255 is 191.25, which rounds to 191, and 191 is BF in hex. Pad single digits with a leading zero, so 5% becomes 0D.

Do all browsers support 8-digit HEX colors?

All current versions of Chrome, Edge, Firefox and Safari support 8-digit HEX and the 4-digit #RGBA shorthand. Very old browsers such as Internet Explorer do not, and some email clients and design tools may also ignore the alpha pair. In those cases rgba() is the safer format, and this calculator gives you both.

Learn more

Guides for the HEX Opacity Calculator

HEX Color Opacity: 8-Digit HEX, RGBA and a Full Transparency Table

Learn how HEX opacity works with 8-digit HEX codes, get a full transparency table from 100% to 0%, and know when to use #RRGGBBAA, rgba() or opacity.

Read Guide

CSS Box Shadow: How to Create Realistic, Layered Shadows

Master CSS box shadow syntax, then build realistic layered shadows with tinted colors, elevation tokens and dark-mode variants that look natural in any UI.

Read Guide

Glassmorphism in CSS: How to Build Frosted Glass UI That Stays Readable

Build glassmorphism CSS that works: backdrop-filter blur with the -webkit- prefix, @supports fallbacks, readable text on busy backgrounds, and fast mobile UI.

Read Guide
Copied