|
|
@ -119,7 +119,7 @@ var parseColor = exports.parseColor = function(str){ |
|
|
|
]; |
|
|
|
// #RRGGBB
|
|
|
|
} else if ('#' == str.charAt(0) && str.length > 4) { |
|
|
|
var captures = /#(\w{2})(\w{2})(\w{2})/.exec(str); |
|
|
|
var captures = /#([a-fA-F\d]{2})([a-fA-F\d]{2})([a-fA-F\d]{2})/.exec(str); |
|
|
|
if (!captures) return; |
|
|
|
return cache[str] = [ |
|
|
|
parseInt(captures[1], 16) |
|
|
@ -129,7 +129,7 @@ var parseColor = exports.parseColor = function(str){ |
|
|
|
]; |
|
|
|
// #RGB
|
|
|
|
} else if ('#' == str.charAt(0)) { |
|
|
|
var captures = /#(\w)(\w)(\w)/.exec(str); |
|
|
|
var captures = /#([a-fA-F\d])([a-fA-F\d])([a-fA-F\d])/.exec(str); |
|
|
|
if (!captures) return; |
|
|
|
return cache[str] = [ |
|
|
|
parseInt(captures[1] + captures[1], 16) |
|
|
|