Package org.openhab.core.util
Record Class ColorUtil.Gamut
java.lang.Object
java.lang.Record
org.openhab.core.util.ColorUtil.Gamut
- Record Components:
r
- double array withxy
coordinates for red, x, y between 0.0000 and 1.0000.g
- double array withxy
coordinates for green, x, y between 0.0000 and 1.0000.b
- double array withxy
coordinates for blue, x, y between 0.0000 and 1.0000.
- Enclosing class:
- ColorUtil
Color gamut
-
Constructor Summary
ConstructorDescriptionGamut
(double[] r, double[] g, double[] b) Creates an instance of aGamut
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
b()
Returns the value of theb
record component.return point in color gamut closest to a given pointfinal boolean
Indicates whether some other object is "equal to" this one.double[]
g()
Returns the value of theg
record component.final int
hashCode()
Returns a hash code value for this object.double[]
r()
Returns the value of ther
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
closest
return point in color gamut closest to a given point- Parameters:
p
- a color point- Returns:
- the color point closest to in this gamut
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
r
public double[] r()Returns the value of ther
record component.- Returns:
- the value of the
r
record component
-
g
public double[] g()Returns the value of theg
record component.- Returns:
- the value of the
g
record component
-
b
public double[] b()Returns the value of theb
record component.- Returns:
- the value of the
b
record component
-