Record Class LabColor
java.lang.Object
java.lang.Record
org.skriptlang.skript.util.LabColor
-
Constructor Summary
ConstructorsConstructorDescriptionLabColor(double L, double a, double b) Creates an instance of aLabColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublea()Returns the value of thearecord component.doubleb()Returns the value of thebrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleeuclideanDistance(LabColor other) doubleeuclideanDistanceSquared(LabColor other) static LabColorfromRGB(double r, double g, double b) static LabColorfromRGB(int rgb) static LabColorfromRGB(int r, int g, int b) final inthashCode()Returns a hash code value for this object.doubleL()Returns the value of theLrecord component.inttoRGB()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LabColor
public LabColor(double L, double a, double b) Creates an instance of aLabColorrecord class.- Parameters:
L- the value for theLrecord componenta- the value for thearecord componentb- the value for thebrecord component
-
-
Method Details
-
toRGB
public int toRGB() -
euclideanDistanceSquared
-
euclideanDistance
-
fromRGB
-
fromRGB
-
fromRGB
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
L
public double L()Returns the value of theLrecord component.- Returns:
- the value of the
Lrecord component
-
a
public double a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
public double b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-