Fix css color parse

This commit is contained in:
sapics 2018-12-13 16:48:35 +09:00 committed by Jürg Lehni
parent 449c5c3e6d
commit 5904a288e7
3 changed files with 10 additions and 1 deletions

View file

@ -81,6 +81,9 @@ test('Creating Colors', function() {
equals(new Color('rgba(255, 0, 0, 0.5)'), new Color(1, 0, 0, 0.5),
'Color from rgba() string');
equals(new Color('rgba( 255, 0, 0, 0.5 )'), new Color(1, 0, 0, 0.5),
'Color from rgba() string 2nd test');
equals(new Color('hsl(180deg, 20%, 40%)'),
new Color({ hue: 180, saturation: 0.2, lightness: 0.4 }),
'Color from hsl() string');