@@ -1134,12 +1134,22 @@ sRGB Colors</h2>
11341134<h3 id='rgb-functions'>
11351135The RGB functions: ''rgb()'' and ''rgba()''</h3>
11361136
1137- The ''rgb()'' function defines an sRGB color by specifying the red, green, and blue channels directly.
1138- Its syntax is:
1137+ The ''rgb()'' and ''rgba()'' functions define an sRGB color by specifying the red, green, and blue channels directly.
1138+ Their syntax is:
11391139
11401140 <pre class='prod'>
1141- <dfn>rgb()</dfn> = rgb( [<<percentage>> | none]{3} [ / [<<alpha-value>> | none] ]? ) |
1142- rgb( [<<number>> | none]{3} [ / [<<alpha-value>> | none] ]? )
1141+ <dfn>rgb()</dfn> = [ <<legacy-rgb-syntax>> | <<modern-rgb-syntax>> ]
1142+ <dfn>rgba()</dfn> = [ <<legacy-rgba-syntax>> | <<modern-rgba-syntax>> ]
1143+ <dfn><<legacy-rgb-syntax>></dfn> = rgb( <<percentage>> #{3} , <<alpha-value>> ? ) |
1144+ rgb( <<number>> #{3} , <<alpha-value>> ? )
1145+ <dfn><<legacy-rgba-syntax>></dfn> = rgba( <<percentage>> #{3} , <<alpha-value>> ? ) |
1146+ rgba( <<number>> #{3} , <<alpha-value>> ? )
1147+ <dfn><<modern-rgb-syntax>></dfn> = rgb(
1148+ [ <<number>> | <<percentage>> | none]{3}
1149+ [ / [<<alpha-value>> | none] ]? )
1150+ <dfn><<modern-rgba-syntax>></dfn> = rgba(
1151+ [ <<number>> | <<percentage>> | none]{3}
1152+ [ / [<<alpha-value>> | none] ]? )
11431153 </pre>
11441154
11451155 <wpt>
@@ -1182,18 +1192,8 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
11821192 Values outside these ranges are not invalid,
11831193 but are clamped to the ranges defined here at parsed-value time.
11841194
1185- For legacy reasons,
1186- ''rgb()'' also supports a <a>legacy color syntax</a>
1187- that separates all of its arguments with commas:
1188-
1189- <pre class='prod'>
1190- rgb() = rgb( <<percentage>> #{3} , <<alpha-value>> ? ) |
1191- rgb( <<number>> #{3} , <<alpha-value>> ? )
1192- </pre>
1193-
1194- Also,
1195- an <dfn>rgba()</dfn> <a>legacy color syntax</a> also exists,
1196- with an identical grammar and behavior to ''rgb()'' .
1195+ For historical reasons,
1196+ ''rgb()'' and ''rgba()'' also support a <a>legacy color syntax</a> .
11971197
11981198 <wpt>
11991199 rgba-001.html
0 commit comments