(colorStr)
| 1 | (function($, window) { |
| 2 | var rgbaRegex = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/; |
| 3 | var getColor = function(colorStr) { |
| 4 | var matches = colorStr.match(rgbaRegex); |
| 5 | if (matches && matches.length === 5) { |
| 6 | return [ |
| 7 | matches[1], |
| 8 | matches[2], |
| 9 | matches[3], |
| 10 | matches[4] |
| 11 | ]; |
| 12 | } |
| 13 | return []; |
| 14 | }; |
| 15 | var Transparent = function(element, options) { |
| 16 | this.element = element; |
| 17 | this.options = $.extend({ |