content: package com.github.AAChartModel.AAChartCore.AATools;
  
  import java.util.HashMap;
  import java.util.Map;
  
  public class AAGradientColor {
      public static Map<String, Object> OceanBlue = oceanBlueColor();
      public static Map<String, Object> Sanguine = sanguineColor();
      public static Map<String, Object> LusciousLime = lusciousLimeColor();
      public static Map<String, Object> PurpleLake = purpleLakeColor();
      public static Map<String, Object> FreshPapaya = freshPapayaColor();
      public static Map<String, Object> Ultramarine = ultramarineColor();
      public static Map<String, Object> PinkSugar = pinkSugarColor();
      public static Map<String, Object> LemonDrizzle = lemonDrizzleColor();
      public static Map<String, Object> VictoriaPurple = victoriaPurpleColor();
      public static Map<String, Object> SpringGreens = springGreensColor();
      public static Map<String, Object> MysticMauve = mysticMauveColor();
      public static Map<String, Object> ReflexSilver = reflexSilverColor();
      public static Map<String, Object> NeonGlow = neonGlowColor();
      public static Map<String, Object> BerrySmoothie = berrySmoothieColor();
      public static Map<String, Object> NewLeaf = newLeafColor();
      public static Map<String, Object> CottonCandy = cottonCandyColor();
      public static Map<String, Object> PixieDust = pixieDustColor();
      public static Map<String, Object> FizzyPeach = fizzyPeachColor();
      public static Map<String, Object> SweetDream = sweetDreamColor();
      public static Map<String, Object> Firebrick = firebrickColor();
      public static Map<String, Object> WroughtIron = wroughtIronColor();
      public static Map<String, Object> DeepSea = deepSeaColor();
      public static Map<String, Object> CoastalBreeze = coastalBreezeColor();
      public static Map<String, Object> EveningDelight = eveningDelightColor();
  
  
      private static Map<String, Object> oceanBlueColor() {
          return oceanBlueColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> sanguineColor() {
          return sanguineColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> lusciousLimeColor() {
          return lusciousLimeColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> purpleLakeColor() {
          return purpleLakeColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> freshPapayaColor() {
          return freshPapayaColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> ultramarineColor() {
          return ultramarineColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> pinkSugarColor() {
          return pinkSugarColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> lemonDrizzleColor() {
          return lemonDrizzleColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> victoriaPurpleColor() {
          return victoriaPurpleColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> springGreensColor() {
          return springGreensColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> mysticMauveColor() {
          return mysticMauveColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> reflexSilverColor() {
          return reflexSilverColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> neonGlowColor() {
          return neonGlowColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> berrySmoothieColor() {
          return berrySmoothieColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> newLeafColor() {
          return newLeafColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> cottonCandyColor() {
          return cottonCandyColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> pixieDustColor() {
          return pixieDustColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> fizzyPeachColor() {
          return fizzyPeachColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> sweetDreamColor() {
          return sweetDreamColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> firebrickColor() {
          return firebrickColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> wroughtIronColor() {
          return wroughtIronColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> deepSeaColor() {
          return deepSeaColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> coastalBreezeColor() {
          return coastalBreezeColor(AALinearGradientDirection.ToTop);
      }
  
      private static Map<String, Object> eveningDelightColor() {
          return eveningDelightColor(AALinearGradientDirection.ToTop);
      }
  
  
      public static Map<String, Object> oceanBlueColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#2E3192", "#1BFFFF");
      }
  
      public static Map<String, Object> sanguineColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#D4145A", "#FBB03B");
      }
  
      public static Map<String, Object> lusciousLimeColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#009245", "#FCEE21");
      }
  
      public static Map<String, Object> purpleLakeColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#662D8C", "#ED1E79");
      }
  
      public static Map<String, Object> freshPapayaColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#ED1C24", "#FCEE21");
      }
  
      public static Map<String, Object> ultramarineColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#00A8C5", "#FFFF7E");
      }
  
      public static Map<String, Object> pinkSugarColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#D74177", "#FFE98A");
      }
  
      public static Map<String, Object> lemonDrizzleColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#FB872B", "#D9E021");
      }
  
      public static Map<String, Object> victoriaPurpleColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#312A6C", "#852D91");
      }
  
      public static Map<String, Object> springGreensColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#009E00", "#FFFF96");
      }
  
      public static Map<String, Object> mysticMauveColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#B066FE", "#63E2FF");
      }
  
      public static Map<String, Object> reflexSilverColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#808080", "#E6E6E6");
      }
  
      public static Map<String, Object> neonGlowColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#00FFA1", "#00FFFF");
      }
  
      public static Map<String, Object> berrySmoothieColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#8E78FF", "#FC7D7B");
      }
  
      public static Map<String, Object> newLeafColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#00537E", "#3AA17E");
      }
  
      public static Map<String, Object> cottonCandyColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#FCA5F1", "#B5FFFF");
      }
  
      public static Map<String, Object> pixieDustColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#D585FF", "#00FFEE");
      }
  
      public static Map<String, Object> fizzyPeachColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#F24645", "#EBC08D");
      }
  
      public static Map<String, Object> sweetDreamColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#3A3897", "#A3A1FF");
      }
  
      public static Map<String, Object> firebrickColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#45145A", "#FF5300");
      }
  
      public static Map<String, Object> wroughtIronColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#333333", "#5A5454");
      }
  
      public static Map<String, Object> deepSeaColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#4F00BC", "#29ABE2");
      }
  
      public static Map<String, Object> coastalBreezeColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#00B7FF", "#FFFFC7");
      }
  
      public static Map<String, Object> eveningDelightColor(AALinearGradientDirection direction) {
          return linearGradient(direction, "#93278F", "#00A99D");
      }
  
      public static Map<String, Object> linearGradient(String startColor,
                                                       String endColor) {
          return linearGradient(AALinearGradientDirection.ToTop, startColor, endColor);
      }
  
      public static Map<String, Object> linearGradient(
              AALinearGradientDirection direction,
              String startColor,
              String endColor
      ) {
          return linearGradient(direction, new Object[][]{
                  {0, startColor},
                  {1, endColor},
          });
      }
  
      public static Map<String, Object> linearGradient(
              AALinearGradientDirection direction,
              Object[][] stopsArr
      ) {
          Map<String, Object> linearGradientColorMap = new HashMap<>();
          linearGradientColorMap.put("linearGradient", linearGradientMap(direction));
          linearGradientColorMap.put("stops", stopsArr);
          return linearGradientColorMap;
      }
  
      /**
       * (0,0) ----------- (1,0)
       * |                   |
       * |                   |
       * |                   |
       * |                   |
       * |                   |
       * (0,1) ----------- (1,1)
       */
      private static Map<String, Integer> linearGradientMap(AALinearGradientDirection direction) {
          switch (direction) {
              case ToTop:
                  return linearGradientMap(0, 1, 0, 0);
              case ToBottom:
                  return linearGradientMap(0, 0, 0, 1);
              case ToLeft:
                  return linearGradientMap(1, 0, 0, 0);
              case ToRight:
                  return linearGradientMap(0, 0, 1, 0);
              case ToTopLeft:
                  return linearGradientMap(1, 1, 0, 0);
              case ToTopRight:
                  return linearGradientMap(0, 1, 1, 0);
              case ToBottomLeft:
                  return linearGradientMap(1, 0, 0, 1);
              case ToBottomRight:
                  return linearGradientMap(0, 0, 1, 1);
              default:
                  return null;
          }
      }
  
      private static Map<String, Integer> linearGradientMap(int x1, int y1, int x2, int y2) {
          Map<String, Integer> linearGradientMap = new HashMap<>();
          linearGradientMap.put("x1", x1);
          linearGradientMap.put("y1", y1);
          linearGradientMap.put("x2", x2);
          linearGradientMap.put("y2", y2);
          return linearGradientMap;
      }
  }
  