On this page

Opacity

How see-through something is. Beehexa uses it in two places only, so every control keeps colours people can read.

Opacity sets how see-through an element is. A faded element lets the background show through, so its colour changes from screen to screen. Beehexa uses opacity in two places only: images inside something turned off, and the scrim behind dialogs.

Why controls use colour

  • The background shows through. A faded button looks different on a white card, a yellow banner and a selected row.
  • Contrast is no longer checked. A faded colour is a new colour, and text on it may become unreadable.
  • Opacity multiplies. A 40% item inside a 40% card ends up at 16%.

The disabled colour tokens, such as color.text.disabled, look the same on every background. See Interaction states.

I need to Use
Fade a logo, avatar or illustration of something turned off opacity.disabled (0.4) on the image
Turn off a button, input, text or icon The disabled colour tokens
Dim the page behind a dialog or drawer color.surface.scrim
Fade something in or out Opacity 0 and 1 in an animation, see Motion

Images that are turned off

Images have their own colours, so no colour token can change them. Fade the image; give the text color.text.disabled; keep the card’s border. Always say “Turned off” in words as well.

The scrim

The scrim dims the page behind a dialog or drawer, so the dialog is the focus and the page reads as unavailable. It is a colour with transparency built in: graphite at 40% in light mode, black at 60% in dark mode, where a dark page needs more to dim. Use it as it is.

Light: graphite at 40%
Dark: black at 60%

Do and don’t

Do

Fade the logo only. The card keeps its border, and the text uses the disabled colour.

Don’t

Don’t fade the whole card. Its border and text fade too, and the page shows through.

Do

Turn a control off with the disabled colours. It looks the same on any background.

Don’t

Don’t fade a control with opacity. The background shows through, and the text loses contrast.

Tokens

TokenValueDescription
--bh-opacity-disabled0.4Images, logos, avatars and illustrations inside something that is turned off. Never for buttons, inputs, text or icons: they use the disabled colour tokens.