Relative color from currentcolor

Hello everyone,

On MDN's relative color page (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/Relative_colors) it's stated that origin-color should be any valid color, including currentcolor.

But when I try to do something like this :
color: red;
background-color: currentcolor;
background-color: rgb(from red r g b / 0.5);
background-color: rgb(from currentcolor r g b / 0.5);

First and second background-color work fine, but not the third one (see attachment).

Does anyone have any idea if I'm doing something wrong ? Or do I missing something ? :think:

PS: I tried
color
with both lower and upper case
c
SPOILER_image.png
MDN Web Docs
The CSS colors module defines relative color syntax, which allows a CSS value to be defined relative to another color. This is a powerful feature that enables easy creation of complements to existing colors — such as lighter, darker, saturated, semi-transparent, or inverted variants — enabling more effective color palette creation.
Using relative colors - CSS: Cascading Style Sheets | MDN
Was this page helpful?