Summary:
The alpha() relative color function allows creating a new color by only modifying the alpha component of an origin color, while retaining the original color space and color components. This provides a simpler way for authors to create translucent versions of colors without needing to know the original color space or to duplicate color components using a different relative color function.
We intend to enable this function in Firefox Nightly builds behind the layout.css.alpha-color-function.enabled pref.
Bug:
Bug 2042646 - Implement alpha() function
Specification:
https://drafts.csswg.org/css-color-5/#relative-alpha
Standards Body:
CSSWG / W3C
Platform Coverage:
All
Preference:
layout.css.alpha-color-function.enabled — Bug 2047437 to enable in Nightly
DevTools Bug:
N/A
Extensions Bug:
N/A
Use Counter:
N/A
Standards-Positions Discussion:
https://github.com/mozilla/standards-positions/issues/1396 — Positive
Other Browsers:
- Blink: Estimated to ship in Chrome 150 (Intent to Ship)
- WebKit: Implementation in progress (https://github.com/WebKit/WebKit/pull/66126)
web-platform-tests:
https://wpt.fyi/results/css/css-color/parsing/