Intent to Prototype: alpha() relative color function

57 views
Skip to first unread message

Sajid Anwar

unread,
Jun 14, 2026, 5:51:40 PM (3 days ago) Jun 14
to dev-pl...@mozilla.org

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/

Note: There are open questions regarding serialization of alpha() color values that may affect some existing test cases. See the following issues for details:
- https://github.com/w3c/csswg-drafts/issues/13992
- https://github.com/w3c/csswg-drafts/issues/13994
- https://github.com/web-platform-tests/wpt/issues/60611


Nicolas Chevobbe

unread,
Jun 16, 2026, 5:24:54 AM (yesterday) Jun 16
to dev-pl...@mozilla.org, sajida...@gmail.com
That's great :)

Note that I was playing with the current version in Nightly and I found a couple issues for DevTools:

Reply all
Reply to author
Forward
0 new messages