We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2db213 commit 3b3e019Copy full SHA for 3b3e019
test/jasmine/tests/color_test.js
@@ -175,4 +175,25 @@ describe('Test color:', function() {
175
});
176
177
178
+
179
+ describe('contrast', function() {
180
181
+ it('should darken light colors', function() {
182
+ var out = Color.contrast('#eee', 10, 20);
183
184
+ expect(out).toEqual('#bbbbbb');
185
+ });
186
187
+ it('should darken light colors (2)', function() {
188
+ var out = Color.contrast('#fdae61', 10, 20);
189
190
+ expect(out).toEqual('#f57a03');
191
192
193
+ it('should lighten dark colors', function() {
194
+ var out = Color.contrast('#2b83ba', 10, 20);
195
196
+ expect(out).toEqual('#449dd4');
197
198
199
0 commit comments