coderef

alpha()Baseline · Newly available

The alpha() CSS function computes a relative color value by adjusting the opacity of an origin color.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Sep 14, 2026.

Browser support

DesktopChrome
1–150Not supported
151+Supportedsince Jul 28, 2026
Current: 155
Edge
12–150Not supported
151+Supportedsince Jul 31, 2026
Current: 154
Firefox
1–154Not supported
155+Supportedsince Sep 1, 2026
Current: 157
Safari
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27
MobileChrome Android
18–150Not supported
151+Supportedsince Jul 28, 2026
Current: 155
Firefox Android
4–154Not supported
155+Supportedsince Sep 1, 2026
Current: 157
Safari iOS
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Sep 14, 2026. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: alpha.

Feature detection

CSS · check before using
@supports (color: color(display-p3 1 0 0)) {
  /* styles that use alpha */
}

/* or in JavaScript */
if (CSS.supports("color", "color(display-p3 1 0 0)")) {
  // use it
}

Documentation (MDN)

Specification