Class HSLAColor
java.lang.Object
software.xdev.chartjs.model.color.HSLAColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleprotected final doubleprotected final doubleprotected static final Randomprotected final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoublegetAlpha()doublegetHue()doubledoubleinthashCode()hsla()static booleanisAlphaWithinBounds(double alpha) static booleanisPercentWithinBounds(double percent) static HSLAColorrandom()toString()
-
Field Details
-
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
-
-
Method Details
-
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
- Returns:
- serialized version of this
Color, as used for JSON.
-
toString
-
equals
-
hashCode
public int hashCode()
-