Class HSLColor

  • All Implemented Interfaces:
    Color

    public class HSLColor
    extends java.lang.Object
    implements Color
    Hue/Saturation/Lightness

    The hue component should be between0.0and360.0 The saturation component should be between0.0and1.0 The lightness component should be between0.0and1.0 The alpha component should be between0.0and1.0

    • Field Detail

      • hue

        public final float hue
      • saturation

        public final float saturation
      • lightness

        public final float lightness
      • alpha

        public final float alpha
    • Constructor Detail

      • HSLColor

        public HSLColor​(float hue,
                        float saturation,
                        float lightness,
                        float alpha)
    • Method Detail

      • toRGB

        public RGBColor toRGB()
        Description copied from interface: Color
        Returns a conversion of this Color into an RGBColor. If this colour is already an instance of RGBColor then the same instance will be returned.
        Specified by:
        toRGB in interface Color
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object