Skip to content
BENIBIX Learn

Opacity

Design📐 Design StandardsSpace and Depth

Also known as Transparency (Design), Layer Opacity, Opacity (CSS)

How solid a thing looks. At 0% you see right through it. At 100% it is solid.

Think of it like

Frosted glass lets a bit of light through. Clear glass lets it all through, and a wall lets none.

Example

A dialog opens over a page. A black layer at 50% opacity dims the page, so the dialog stands out.

Why it matters

It lets you dim, layer and soften things without adding new colors.

Definition

Opacity is how solid a thing looks, from fully see-through to fully solid. At 100%, nothing behind it shows. At 0%, it cannot be seen at all. In between, the colors behind it mix with its own. Designers use it for the dark layer behind a dialog, for disabled buttons and for soft shadows.

Example code

css
.backdrop {
  background: black;
  opacity: 0.5;
}
The dark layer behind a dialog is half see-through, so the page still shows.
The same blue square at 100, 60 and 20 percent opacity, over gray stripes.

Common mistake

Fading text to show it matters less. Pale text on a pale page can fail contrast rules.

Key takeaways

  1. 1
    0 to 100. From not seen at all to fully solid.
  2. 2
    Mixes with behind. The layer below shows through.
  3. 3
    Watch contrast. Faded text gets hard to read.

Compare