Skip to content

Commit 7b7ffc5

Browse files
committed
[css-color] Since all implementations agree that rgb() is always sRGB gamut, go ahead and define that all arguments are just clamped to [0%, 100%] range. Fixes w3c#288.
1 parent 6f92416 commit 7b7ffc5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

css-color/Overview.bs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,23 +190,17 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
190190
not just <<integer>>s,
191191
for authoring convenience.
192192

193-
Some devices can output colors technically outside of the sRGB gamut,
194-
represented by channels with values less than ''0%'' or greater than ''100%''.
195-
For this reason, values outside of the 0%-100% range are allowed,
196-
but are clamped to the device's gamut.)
197-
198-
Issue: The transfer function is undefined outside the range 0% to 100%.
199-
200193
The final argument, the <<alpha-value>>, specifies the alpha of the color.
201194
If given as a <<number>>, the useful range of the value is ''0''
202195
(representing a fully transparent color)
203196
to ''1''
204197
(representing a fully opaque color).
205198
If given as a <<percentage>>, ''0%'' represents a fully transparent color,
206199
while ''100%'' represents a fully opaque color.
200+
If omitted, it defaults to ''100%''.
201+
207202
Values outside these ranges are not invalid,
208203
but are clamped to the ranges defined here at computed-value time.
209-
If omitted, it defaults to ''100%''.
210204

211205
Note: For legacy reasons, the ''rgb()'' function and ''rgba()'' functions both exist,
212206
but are aliases of each other.

0 commit comments

Comments
 (0)