diff --git a/files/en-us/web/css/reference/values/color_value/alpha/index.md b/files/en-us/web/css/reference/values/color_value/alpha/index.md index 1fbd745aed7c851..07085a7466fa0e1 100644 --- a/files/en-us/web/css/reference/values/color_value/alpha/index.md +++ b/files/en-us/web/css/reference/values/color_value/alpha/index.md @@ -25,8 +25,8 @@ alpha(from var(--my-color) / calc(alpha * 0.5)) - `from ` - : The [relative color](/en-US/docs/Web/CSS/Guides/Colors/Using_relative_colors) syntax keyword `from` followed by any valid {{cssxref("<color>")}} value, defining the **origin color**. The color components of the origin color are carried through to the result unchanged; only the alpha channel is affected. -- `/ ` {{optional_inline}} - - : An {{cssxref("<alpha-value>")}} specifying the alpha of the output color. This can be a `` between `0` and `1`, a `` between `0%` and `100%`, or a {{cssxref("calc()")}} expression. Within this value, the keyword **`alpha`** may be used to refer to the alpha channel of the origin color as a `` (where `1.0` is equivalent to `100%`). If this argument is omitted, the alpha of the origin color is used unchanged. +- `/ ` + - : An {{cssxref("<alpha-value>")}} specifying the alpha of the output color. This can be a `` between `0` and `1`, a `` between `0%` and `100%`, or a {{cssxref("calc()")}} expression. Within this value, the keyword **`alpha`** may be used to refer to the alpha channel of the origin color as a `` (where `1.0` is equivalent to `100%`). ### Return value @@ -42,6 +42,10 @@ Unlike general [relative color syntax](/en-US/docs/Web/CSS/Guides/Colors/Using_r The return value is always in the same color space as the origin color. For example, if the origin color is an [`oklch()`](/en-US/docs/Web/CSS/Reference/Values/color_value/oklch) color, the result will also be resolved in OKLCh, with the same lightness, chroma, and hue. +## Formal syntax + +{{CSSSyntax}} + ## Examples ### Replacing the alpha of a color