Skip to content

Commit e08e99e

Browse files
committed
Updated Color.webToColor to accept [more] spaces
- webToColor now accepts arbitrary spaces, which are allowed per CSS rules (percents still not supported)
1 parent 3cfe200 commit e08e99e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/Color.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ Phaser.Color = {
607607
out = Phaser.Color.createColor();
608608
}
609609

610-
var result = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/.exec(web);
610+
var result = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(web);
611611

612612
if (result)
613613
{

0 commit comments

Comments
 (0)