1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: rgb() clipping outside device gamut</title>
5 <link rel="author" title="L. David Baron" href="https://dbaron.org/">
6 <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
7 <link rel="help" href="http://www.w3.org/TR/css3-color/#rgb-color">
8 <meta name="flags" content="">
9 <meta name="assert" content="Test clipping of rgb() values outside the device gamut.">
10 <style type="text/css">
11
12 table { border-spacing: 0 2px; padding: 0; border: none; }
13 td { border: none; padding: 0; height: 1.2em; }
14
15 </style>
16 </head>
17 <body>
18
19 <p><strong>WARNING: This test assumes that the device gamut is sRGB
20 (as it will be for many CRT monitors).</strong></p>
21
22 <p>Every row in this table should have both columns the same color:</p>
23
24 <table>
25 <tr>
26 <th style="background:white; color: black">Column 1</th>
27 <th style="background:black; color: white">Column 2</th>
28 </tr>
29 <tr>
30 <td style="background: rgb(-30, 500, -1)"> </td>
31 <td style="background: rgb(0, 255, 0)"> </td>
32 </tr>
33 <tr>
34 <td style="background: rgb(-260, -254, 300)"> </td>
35 <td style="background: rgb(0, 0, 255)"> </td>
36 </tr>
37 <tr>
38 <td style="background: rgb(-254, 256, 0)"> </td>
39 <td style="background: rgb(0, 255, 0)"> </td>
40 </tr>
41 <tr>
42 <td style="background: rgb(-10%, 200%, -1%)"> </td>
43 <td style="background: rgb(0, 255, 0)"> </td>
44 </tr>
45 <tr>
46 <td style="background: rgb(-110%, 130%, -99%)"> </td>
47 <td style="background: rgb(0, 255, 0)"> </td>
48 </tr>
49 <tr>
50 <td style="background: rgb(-99%, 101%, 0%)"> </td>
51 <td style="background: rgb(0, 255, 0)"> </td>
52 </tr>
53 <tr>
54 <td style="background: rgb(50, -30, 255)"> </td>
55 <td style="background: rgb(50, 0, 255)"> </td>
56 </tr>
57 <tr>
58 <td style="background: rgb(0, 50, 350)"> </td>
59 <td style="background: rgb(0, 50, 255)"> </td>
60 </tr>
61 </table>
62
63 </body>
64 </html>