mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-28 22:08:54 -04:00
Improve color parsing for 4 characters hex code (#1565)
This commit is contained in:
parent
d070286cde
commit
6f2d75442c
3 changed files with 6 additions and 3 deletions
|
@ -69,8 +69,11 @@ test('Creating Colors', function() {
|
|||
equals(new Color('#FF3300'), new Color(1, 0.2, 0),
|
||||
'Color from uppercase hex string');
|
||||
|
||||
equals(new Color('#f009'), new Color(1, 0, 0, .6),
|
||||
'Color from 4 characters hex code with alpha');
|
||||
|
||||
equals(new Color('#ff000099'), new Color(1, 0, 0, .6),
|
||||
'Color from hex code with alpha');
|
||||
'Color from 8 characters hex code with alpha');
|
||||
|
||||
equals(new Color('rgb(255, 0, 0)'), new Color(1, 0, 0),
|
||||
'Color from rgb() string');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue