What alpha() does

alpha() is a CSS color function that takes a relative color and returns it with reduced opacity. Because it operates through the relative color syntax, the same transformation works regardless of which color value type you hand it.

.some-element {
  background-color: alpha(from orange / 25%); /* 25% transparency */
}

That uniformity is the practical benefit: rather than switching formats to apply transparency, you keep the original value and express the change once.

Working with design tokens

Named colors are the obvious illustration, since they cannot carry an alpha value on their own and would otherwise need a hex code or another color function to gain transparency. But the more realistic scenario is a design token holding a solid color. Instead of introducing a second token just for a translucent variant — say, for subdued link underlines — you have three options:

:root {
  --orange: rgb(255, 122, 24);
  --chill-orange: rgb(255, 122, 24 / 50%);
}

a {
  text-decoration-color: var(--chill-orange);
}
  • create a dedicated token for the instance;
  • run color-mix() against transparent;
  • reuse the existing token and transform it in place.
:root {
  --orange: rgb(255, 122, 24);
}

a {
  text-decoration-color: color-mix(in srgb, var(--orange), 50%);
}
:root {
  --orange: rgb(255, 122, 24);
}

a {
  text-decoration-color: alpha(from var(--chill-orange) / 50%);
}

The third approach keeps the token list unchanged and the declaration short.

Theming and lighter backgrounds

The same idea carries over to background-color, where a lighter variant of a token is often needed. Light and dark color themes are another natural fit for transforming a single source color.

:root {
  /* Support color theming */
  color-scheme: light dark;

  /* Orange is chill in light mode and solid in dark mode */
  --orange: light-dark(alpha(from rgb(255, 122, 24) / 50%), rgb(255, 122, 24));
}

Reducing an existing alpha value

Tokens sometimes already include partial transparency. alpha() lets you override that at the usage site, adding further transparency without touching the token itself.

:root {
  --orange: rgb(255, 122, 24 / 25%);
}
:root {
  --orange: rgb(255, 122, 24 / 25%); /* 25% transparent */
}

a {
  text-decoration-color: alpha(from var(--orange) / 50%); /* 50% transparent */
}

If the result should scale with the source rather than be pinned to a fixed value, the alpha component can be computed with calc(), so the derived color stays relative to the original token's opacity.

:root {
  --orange: rgb(255, 122, 24 / 10%); /* 10% transparent */
}

a {
  /* 75% more transparent than --orange's 10% */
  text-decoration-color: alpha(from var(--orange) / calc(alpha * 75%));
}

Syntax and accepted values

The function's formal syntax is:

<alpha()> = alpha( from <color> / [ <alpha-value> | none ] )  

The <alpha-value> slot accepts a number or a percentage. All the examples above use percentages, but a decimal between 0 and 1 is equally valid:

text-decoration-color: alpha(from var(--orange) / calc(alpha * .75)); /* 75% transparent */

Availability

alpha() reached Baseline "Newly Available" in September 2026 and is projected to be "Widely Available" in March 2029 as of writing.