@@ -171,8 +171,8 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
171
171
Its syntax is:
172
172
173
173
<pre class='prod'>
174
- <dfn>rgb()</dfn> = rgb( <<rgb-component>> #{3} [ , <<alpha-value>> ] ? )
175
- <dfn>rgba()</dfn> = rgba( <<rgb-component>> #{3} , <<alpha-value>> )
174
+ <dfn>rgb()</dfn> = rgb( <<rgb-component>> #{3} , <<alpha-value>> ? )
175
+ <dfn>rgba()</dfn> = rgba( <<rgb-component>> #{3} , <<alpha-value>> ? )
176
176
<dfn><rgb-component></dfn> = <<number>> | <<percentage>>
177
177
<dfn><alpha-value></dfn> = <<number>> | <<percentage>>
178
178
</pre>
@@ -197,7 +197,6 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
197
197
198
198
Issue: The transfer function is undefined outside the range 0% to 100%.
199
199
200
-
201
200
The final argument, the <<alpha-value>> , specifies the alpha of the color.
202
201
If given as a <<number>> , the useful range of the value is ''0''
203
202
(representing a fully transparent color)
@@ -209,6 +208,10 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
209
208
but are clamped to the ranges defined here at computed-value time.
210
209
If omitted, it defaults to ''100%'' .
211
210
211
+ Note: For legacy reasons, the ''rgb()'' function and ''rgba()'' functions both exist,
212
+ but are aliases of each other.
213
+ Both of them allow specifying an RGB color with an optional alpha value.
214
+
212
215
<h3 id='hex-notation'>
213
216
The RGB hexadecimal notations: ''#RRGGBB''</h3>
214
217
@@ -709,8 +712,8 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
709
712
The syntax of the ''hsl()'' function is:
710
713
711
714
<pre class='prod'>
712
- <dfn>hsl()</dfn> = hsl( <<hue>> , <<percentage>> , <<percentage>> [ , <<alpha-value>> ] ? )
713
- <dfn>hsla()</dfn> = hsla( <<hue>> , <<percentage>> , <<percentage>> , <<alpha-value>> )
715
+ <dfn>hsl()</dfn> = hsl( <<hue>> , <<percentage>> , <<percentage>> , <<alpha-value>> ? )
716
+ <dfn>hsla()</dfn> = hsla( <<hue>> , <<percentage>> , <<percentage>> , <<alpha-value>> ? )
714
717
<dfn><hue></dfn> = <<number>> | <<angle>>
715
718
</pre>
716
719
@@ -743,7 +746,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
743
746
but this specification does not define how to do so.
744
747
745
748
The final argument specifies the alpha channel of the color.
746
- It's interpreted identically to the fourth argument of the ''rgba ()'' function.
749
+ It's interpreted identically to the fourth argument of the ''rgb ()'' function.
747
750
If omitted, it defaults to ''100%'' .
748
751
749
752
<div class='example'>
@@ -771,6 +774,10 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
771
774
</pre>
772
775
</div>
773
776
777
+ Note: For legacy reasons, the ''hsl()'' function and ''hsla()'' functions both exist,
778
+ but are aliases of each other.
779
+ Both of them allow specifying an HSL color with an optional alpha value.
780
+
774
781
775
782
<h3 id='hsl-to-rgb'>
776
783
Converting HSL colors to RGB colors</h3>
0 commit comments