@@ -1054,6 +1054,43 @@ the allowed [=channel keywords=] are:
10541054 </pre>
10551055</div>
10561056
1057+ <h4 id="relative-color">Relative color-function colors</h4>
1058+
1059+ The grammar of the ''color()'' function is extended as follows:
1060+
1061+ <pre class='prod'>
1062+ <dfn>color()</dfn> = color( [from <<color>> ]? <<colorspace-params>> [ / <<alpha-value>> ]? )
1063+ <dfn>colorspace-params</dfn> = [<<custom-params>> | <<predefined-rgb-params>> | <<xyz-params>> ]
1064+ <dfn>custom-params</dfn> = <<dashed-ident>> [ <<number>> | <<percentage>> ]#
1065+ <dfn>predefined-rgb-params</dfn> = <<predefined-rgb>> [ <<number>> | <<percentage>> ]{3}
1066+ <dfn>predefined-rgb</dfn> = srgb | display-p3 | a98-rgb | prophoto-rgb | rec2020
1067+ <dfn>xyz-params</dfn> = xyz <<number>> {3}
1068+ </pre>
1069+
1070+ Within a [=relative color=] syntax ''color()'' function using <<custom-params>> ,
1071+ the number and name of the allowed [=channel keywords=] are defined by the
1072+ '@color-profile/components' descriptor on the corresponding ''@color-profile'' ,
1073+ if present;
1074+ otherwise, no relative color manipulation is valid.
1075+
1076+ They are all <<percentage>> s that correspond to the [=origin color's=] channels
1077+ after its conversion to the color space of the color profile.
1078+
1079+ Within a [=relative color=] syntax ''color()'' function using <<predefined-rgb-params>> ,
1080+ the allowed [=channel keywords=] are:
1081+
1082+ * <dfn value for="color()">r</dfn> , <dfn value for="color()">g</dfn> , and <dfn value for="color()">b</dfn>
1083+ are all <<percentage>> s
1084+ that correspond to the [=origin color's=] red, green, and blue channels
1085+ after its conversion to the predefined RGB color space.
1086+
1087+ Within a [=relative color=] syntax ''color()'' function using <<xyz-params>> ,
1088+ the allowed [=channel keywords=] are:
1089+
1090+ * <dfn value for="color()">x</dfn> , <dfn value for="color()">x</dfn> , <dfn value for="color()">x</dfn> are all <<number>> s
1091+ that correspond to the [=origin color's=] X, Y and Z channels
1092+ after its conversion to relative, D50-adapted CIE XYZ color space.
1093+
10571094
10581095
10591096Security and Privacy Considerations {#priv-sec}
0 commit comments