OLD | NEW |
| (Empty) |
1 Tests that the displayed string for colors correctly handles clipped CSS values
and RGB percentages. | |
2 | |
3 | |
4 Running: testColors | |
5 | |
6 color: red | |
7 simple: true | |
8 original: red | |
9 nickname: red | |
10 hex: #FF0000 | |
11 shorthex: #F00 | |
12 rgb: rgb(255, 0, 0) | |
13 hsl: hsl(0, 100%, 50%) | |
14 | |
15 color: #F00 | |
16 simple: true | |
17 original: #F00 | |
18 nickname: red | |
19 hex: #FF0000 | |
20 shorthex: #F00 | |
21 rgb: rgb(255, 0, 0) | |
22 hsl: hsl(0, 100%, 50%) | |
23 | |
24 color: rgb(255,0,0) | |
25 simple: true | |
26 original: rgb(255,0,0) | |
27 nickname: red | |
28 hex: #FF0000 | |
29 shorthex: #F00 | |
30 rgb: rgb(255, 0, 0) | |
31 hsl: hsl(0, 100%, 50%) | |
32 | |
33 color: rgb(300,0,0) | |
34 simple: true | |
35 original: rgb(300,0,0) | |
36 nickname: red | |
37 hex: #FF0000 | |
38 shorthex: #F00 | |
39 rgb: rgb(255, 0, 0) | |
40 hsl: hsl(0, 100%, 50%) | |
41 | |
42 color: rgb(255,-10,0) | |
43 simple: true | |
44 original: rgb(255,-10,0) | |
45 nickname: red | |
46 hex: #FF0000 | |
47 shorthex: #F00 | |
48 rgb: rgb(255, 0, 0) | |
49 hsl: hsl(0, 100%, 50%) | |
50 | |
51 color: rgb(110%, 0%, 0%) | |
52 simple: true | |
53 original: rgb(110%, 0%, 0%) | |
54 nickname: red | |
55 hex: #FF0000 | |
56 shorthex: #F00 | |
57 rgb: rgb(255, 0, 0) | |
58 hsl: hsl(0, 100%, 50%) | |
59 | |
60 color: rgba(0,0,0,0.5) | |
61 simple: false | |
62 original: rgba(0,0,0,0.5) | |
63 rgb: null | |
64 rgba: rgba(0, 0, 0, 0.5) | |
65 hsl: null | |
66 hsla: hsla(0, 0%, 0%, 0.5) | |
67 | |
68 color: hsl(-120, 100%, 50%) | |
69 simple: true | |
70 original: hsl(-120, 100%, 50%) | |
71 nickname: blue | |
72 hex: #0000FF | |
73 shorthex: #00F | |
74 rgb: rgb(0, 0, 255) | |
75 hsl: hsl(240, 100%, 50%) | |
76 | |
77 color: hsl(-120, 200%, 200%) | |
78 simple: true | |
79 original: hsl(-120, 200%, 200%) | |
80 nickname: white | |
81 hex: #FFFFFF | |
82 shorthex: #FFF | |
83 rgb: rgb(255, 255, 255) | |
84 hsl: hsl(0, 100%, 100%) | |
85 | |
86 color: hsl(-120, -200%, -200%) | |
87 simple: true | |
88 original: hsl(-120, -200%, -200%) | |
89 nickname: black | |
90 hex: #000000 | |
91 shorthex: #000 | |
92 rgb: rgb(0, 0, 0) | |
93 hsl: hsl(0, 0%, 0%) | |
94 | |
95 color: hsla(-120, -200%, -200%, -5) | |
96 simple: false | |
97 original: hsla(-120, -200%, -200%, -5) | |
98 nickname: transparent | |
99 rgb: null | |
100 rgba: rgba(0, 0, 0, 0) | |
101 hsl: null | |
102 hsla: hsla(0, 0%, 0%, 0) | |
103 | |
104 color: hsla(240,100%,50%,0.05) | |
105 simple: false | |
106 original: hsla(240,100%,50%,0.05) | |
107 rgb: null | |
108 rgba: rgba(0, 0, 255, 0.05) | |
109 hsl: null | |
110 hsla: hsla(240, 100%, 50%, 0.05) | |
111 | |
112 color: hsl(200.5,0%,50%) | |
113 simple: true | |
114 original: hsl(200.5,0%,50%) | |
115 nickname: grey | |
116 hex: #808080 | |
117 rgb: rgb(128, 128, 128) | |
118 hsl: hsl(0, 0%, 50%) | |
119 | |
120 color: hsla(200,1.5%,50%,1) | |
121 simple: true | |
122 original: hsla(200,1.5%,50%,1) | |
123 hex: #7E8081 | |
124 rgb: rgb(126, 128, 129) | |
125 hsl: hsl(200, 1%, 50%) | |
126 | |
127 color: rgba(255, 0, 0, -5) | |
128 simple: false | |
129 original: rgba(255, 0, 0, -5) | |
130 rgb: null | |
131 rgba: rgba(255, 0, 0, 0) | |
132 hsl: null | |
133 hsla: hsla(0, 100%, 50%, 0) | |
134 | |
135 color: rgba(255, 0, 0, 5) | |
136 simple: true | |
137 original: rgba(255, 0, 0, 5) | |
138 nickname: red | |
139 hex: #FF0000 | |
140 shorthex: #F00 | |
141 rgb: rgb(255, 0, 0) | |
142 hsl: hsl(0, 100%, 50%) | |
143 | |
144 Running: testInvalidColors | |
145 | |
146 SUCCESS: parsed invalid color none to null | |
147 | |
148 SUCCESS: parsed invalid color #0000 to null | |
149 | |
150 SUCCESS: parsed invalid color #00000 to null | |
151 | |
152 SUCCESS: parsed invalid color #ggg to null | |
153 | |
154 SUCCESS: parsed invalid color rgb(a,b,c) to null | |
155 | |
156 SUCCESS: parsed invalid color rgb(a,b,c,d) to null | |
157 | |
158 SUCCESS: parsed invalid color rgb(1,1,1.2) to null | |
159 | |
160 SUCCESS: parsed invalid color rgba(0,0,0,1%) to null | |
161 | |
162 SUCCESS: parsed invalid color hsl(0,0,0) to null | |
163 | |
164 SUCCESS: parsed invalid color hsl(0%, 0%, 0%) to null | |
165 | |
166 SUCCESS: parsed invalid color hsl(0, 0%, 0) to null | |
167 | |
168 SUCCESS: parsed invalid color hsl(a,b,c) to null | |
169 | |
170 SUCCESS: parsed invalid color hsla(0,0,0,0) to null | |
171 | |
172 SUCCESS: parsed invalid color hsla to null | |
173 | |
OLD | NEW |