Skip to content

Commit

Permalink
fixed matchRGB pattern to correctly capture alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
moagrius committed Nov 8, 2011
1 parent 22d3de2 commit 291e338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Color.commented.js
Expand Up @@ -63,7 +63,7 @@
var leadHex = /^#/;

var matchHSL = /^hsla?\((\d{0,3}),\s*(\d{1,3})%,\s*(\d{1,3})%(,\s*[01](\.\d+)*)\)$/;
var matchRGB = /^rgba?\((\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?)(,\s*[01]?\.?\d*)?\)$/;
var matchRGB = /^rgba?\((\d{1,3}%?),\s*(\d{1,3}%?),\s*(\d{1,3}%?),\s*([01]?\.?\d*)?\)$/;

/**
* Color instance - get, update and output a Color between structures.
Expand Down

0 comments on commit 291e338

Please sign in to comment.