Package org.openhab.core.util
Record Class ColorUtil.Gamut
java.lang.Object
java.lang.Record
org.openhab.core.util.ColorUtil.Gamut
- Enclosing class:
- ColorUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
b()
Returns the value of theb
record component.org.openhab.core.util.ColorUtil.Point
closest
(org.openhab.core.util.ColorUtil.Point p) 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
-
Gamut
public Gamut(double[] r, double[] g, double[] b) Color gamut- Parameters:
r
- double array with `xy` coordinates for red, x, y between 0.0000 and 1.0000.g
- double array with `xy` coordinates for green, x, y between 0.0000 and 1.0000.b
- double array with `xy` coordinates for blue, x, y between 0.0000 and 1.0000.
-
-
Method Details
-
closest
public org.openhab.core.util.ColorUtil.Point closest(org.openhab.core.util.ColorUtil.Point p) 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
-