MCPcopy Create free account
hub / github.com/dcloudio/mui / getColor

Function getColor

js/mui.transparent.js:3–14  ·  view source on GitHub ↗
(colorStr)

Source from the content-addressed store, hash-verified

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({

Callers 1

TransparentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected