SVG icon indicating copy to clipboard operation
SVG copied to clipboard

rgb() color values should be clipped

Open wieslawsoltes opened this issue 4 years ago • 0 comments

Description

Values outside the device gamut should be clipped: the red, green, and blue values must be changed to fall within the range supported by the device. For a typical CRT monitor, whose device gamut is the same as sRGB, the three rules below are equivalent:

https://www.w3.org/TR/2008/REC-CSS2-20080411/syndata.html#color-units

Example data

EM { color: rgb(300,0,0) }       /* clipped to rgb(255,0,0) */
EM { color: rgb(255,-10,0) }     /* clipped to rgb(255,0,0) */
EM { color: rgb(110%, 0%, 0%) }  /* clipped to rgb(100%,0%,0%) */

Used Versions

wieslawsoltes avatar Jan 12 '21 17:01 wieslawsoltes