Class HSVColor

  • All Implemented Interfaces:
    Color

    public class HSVColor
    extends java.lang.Object
    implements Color
    Hue/Saturation/Value

    The hue component should be between 0.0 and 360.0 The saturation component should be between 0.0 and 1.0 The lightness component should be between 0.0 and 1.0 The alpha component should be between 0.0 and 1.0

    • Field Detail

      • hue

        public final float hue
      • saturation

        public final float saturation
      • value

        public final float value
      • alpha

        public final float alpha
    • Constructor Detail

      • HSVColor

        public HSVColor​(float hue,
                        float saturation,
                        float value,
                        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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object