Package com.sksamuel.scrimage.color
Class HSVColor
- java.lang.Object
-
- com.sksamuel.scrimage.color.HSVColor
-
- All Implemented Interfaces:
Color
public class HSVColor extends java.lang.Object implements Color
Hue/Saturation/ValueThe 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 Summary
Fields Modifier and Type Field Description float
alpha
float
hue
float
saturation
float
value
-
Constructor Summary
Constructors Constructor Description HSVColor(float hue, float saturation, float value, float alpha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
HSVColor
toHSV()
RGBColor
toRGB()
Returns a conversion of this Color into an RGBColor.java.lang.String
toString()
-
-
-
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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-