Class HSLAColor

java.lang.Object
software.xdev.chartjs.model.color.HSLAColor

public class HSLAColor extends Object
  • Field Details

    • RANDOMIZER

      protected static final Random RANDOMIZER
    • hue

      protected final double hue
    • saturationPercent

      protected final double saturationPercent
    • lightnessPercent

      protected final double lightnessPercent
    • alpha

      protected final double alpha
  • Constructor Details

    • HSLAColor

      public HSLAColor(double hue, double saturationPercent, double lightnessPercent, double alpha)
    • HSLAColor

      public HSLAColor(double hue, double saturationPercent, double lightnessPercent)
    • HSLAColor

      public HSLAColor(HSLAColor color, double alpha)
  • Method Details

    • random

      public static HSLAColor random()
    • isPercentWithinBounds

      public static boolean isPercentWithinBounds(double percent)
    • isAlphaWithinBounds

      public static boolean isAlphaWithinBounds(double alpha)
    • getHue

      public double getHue()
    • getSaturationPercent

      public double getSaturationPercent()
    • getLightnessPercent

      public double getLightnessPercent()
    • getAlpha

      public double getAlpha()
    • hsla

      public String hsla()
      Returns:
      serialized version of this Color, as used for JSON.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object