Support alpha channel in named CSS colors

Closes #1539
This commit is contained in:
Jürg Lehni 2018-10-04 17:26:48 +02:00
commit 47af603173
2 changed files with 38 additions and 30 deletions

View file

@ -60,6 +60,9 @@ test('Creating Colors', function() {
equals(new Color('red'), new Color(1, 0, 0),
'Color from name (red)');
equals(new Color('transparent'), new Color(0, 0, 0, 0),
'Color from name (transparent)');
equals(new Color('#ff0000'), new Color(1, 0, 0),
'Color from hex string');