Relative luminance
= Relative luminance
{title2=$Y$}
For the normalized <sRGB> calculations here, <relative luminance> is the linear-light weighted sum
$$
Y=0.2126R+0.7152G+0.0722B,
$$
where $R,G,B$ are decoded linear-light components, not encoded code values. This is the <sRGB> calculation specified in W3C's WCAG 2.2 definition of <relative luminance>. It places reference black at 0 and reference white at 1; it does not by itself specify an absolute display light level.https://www.w3.org/TR/WCAG22/#dfn-relative-luminance[W3C, WCAG 2.2, definition of relative luminance: sRGB decoding and weights]{ref}
For a neutral <sRGB> shade, $R=G=B=l$, and the weights sum to 1, so $Y=l$. For a coloured <pixel>, <relative luminance> can be encoded as a neutral <sRGB> shade with all three encoded components $E(Y)$. This preserves the specified $Y$ while discarding colour differences; it is one precisely defined <grayscale> conversion, not a unique way to turn all colour images into <grayscale>.