Permalink
Browse files

Merge pull request #2086 from csnardi/patch-1

[css-color-4] Clarify required precision and rounding behavior for color channels
  • Loading branch information...
svgeesus committed Jan 10, 2018
2 parents 4bf5657 + b35113c commit 66c3eebfadf6fd437689d3ac5d2c179ca0c2c0d6
Showing with 3 additions and 3 deletions.
  1. +3 −3 css-color-4/Overview.bs
View
@@ -272,9 +272,9 @@ The RGB functions: ''rgb()'' and ''rgba()''</h3>
but ''255'' represents the maximum.
These values come from the fact that many graphics engines store the color channels internally as a single byte,
which can hold integers between 0 and 255.
However, the CSS syntax allows full <<number>>s,
not just <<integer>>s,
for authoring convenience.
Implementations should honor the precision of the channel as authored or calculated wherever possible.
If this is not possible, the channel should be rounded to the closest value at the highest precision used,
rounding up if two values are equally close.
The final argument, the <<alpha-value>>, specifies the alpha of the color.
If given as a <<number>>, the useful range of the value is ''0''

0 comments on commit 66c3eeb

Please sign in to comment.