code: function(css) {
                  css = trim(css);
  
                  var withInteger = match(rgb_rgba_integer_regex, 255);
                  if (withInteger) {
                      return withInteger;
                  }
                  return match(rgb_rgba_percentage_regex, 100);
  
                  function match(regex, max_value) {
                      var colorGroups = css.match(regex);
  
                      // If there is an "a" after "rgb", there must be a fourth parameter and the other way round
                      if (!colorGroups || (!!colorGroups[1] + !!colorGroups[5] === 1)) {
                          return null;
                      }
  
                      var rgb = factories.RGB();
                      rgb.red = Math.min(1, Math.max(0, colorGroups[2] / max_value));
                      rgb.green = Math.min(1, Math.max(0, colorGroups[3] / max_value));
                      rgb.blue = Math.min(1, Math.max(0, colorGroups[4] / max_value));
                      rgb.alpha = !!colorGroups[5] ? Math.min(Math.max(parseFloat(colorGroups[6]), 0), 1) : 1;
  
                      return rgb;
                  }
              }
docs: CSS RGB(A) literal: