function gradient(colors) {
  var points = [];

  if ((0, _util.isString)(colors)) {
    colors = colors.split('-');
  }

  (0, _util.each)(colors, function (color) {
    if (color.indexOf('#') === -1) {
      color = toHex(color);
    }

    points.push(hex2arr(color));
  });
  return function (percent) {
    return calColor(points, percent);
  };
}
/**
 * handle the gradient color
 * @param  {Array} colors the colors
 * @return {String} return the color value
 */
handle the gradient color
@param  {Array} colors the colors
@return {String} return the color value
handle the gradient color @param { Array } colors the colors @return { String } return the color value
function gradient(colors) {
  var points = [];
  if ((0, _util.isString)(colors)) {
    colors = colors.split('-');
  }
  (0, _util.each)(colors, function (color) {
    if (color.indexOf('#') === -1) {
      color = toHex(color);
    }
    points.push(hex2arr(color));
  });
  return function (percent) {
    return calColor(points, percent);
  };
}
function gradient ( colors ) { var points = [ ] ; if ( ( 0 , _util . isString ) ( colors ) ) { colors = colors . split ( '-' ) ; } ( 0 , _util . each ) ( colors , function ( color ) { if ( color . indexOf ( '#' ) === - 1 ) { color = toHex ( color ) ; } points . push ( hex2arr ( color ) ) ; } ) ; return function ( percent ) { return calColor ( points , percent ) ; } ; }
handle the gradient color
 @param  {Array} colors the colors
 @return {String} return the color value
handle the gradient color @param { Array } colors the colors @return { String } return the color value