docs: function( rgb ){
        var ret;
        var number = $$.util.regex.number;
  
        var m = new RegExp("^" + $$.util.regex.rgba + "$").exec(rgb);
        if( m ){
          ret = [];
  
          var isPct = [];
          for( var i = 1; i <= 3; i++ ){
            var channel = m[i];
  
            if( channel[ channel.length - 1 ] === "%" ){
              isPct[i] = true;
            }
            channel = parseFloat( channel );
  
            if( isPct[i] ){
              channel = channel/100 * 255; // normalise to [0, 255]
            }
  
            if( channel < 0 || channel > 255 ){ return; } // invalid channel value
  
            ret.push( Math.floor(channel) );
          }
  
          var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3];
          var allArePct = isPct[1] && isPct[2] && isPct[3];
          if( atLeastOneIsPct && !allArePct ){ return; } // must all be percent values if one is
  
          var alpha = m[4];
          if( alpha !== undefined ){
            alpha = parseFloat( alpha );
  
            if( alpha < 0 || alpha > 1 ){ return; } // invalid alpha value
  
            ret.push( alpha );
          }
        }
  
        return ret;
      }