fallbackColor = (color, fallbackColor) => {
  let gradient = null;

  let colors = color ? color.split(",") : [];
  if (colors.length > 1 && isValidGradient(colors)) {
    gradient = colors;
  }

  return (
    (gradient ? gradient : isValidHexColor(color) && `#${color}`) ||
    fallbackColor
  );
}
Retrieves a gradient if color has more than one valid hex codes else a single color.

@param {string} color The color to parse.
@param {string | string[]} fallbackColor The fallback color.
@returns {string | string[]} The gradient or color.