toGradient = function toGradient(string) {
  var type = string.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0];
  var colors = string.substring(type.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(toGradientColor);
  return {
    type: type,
    colors: colors
  };
}
toGradient
@param string { string } - string should be in format <type>(color, color)
@returns { {type: *, colors: *} }