Record Class IdColor
java.lang.Object
java.lang.Record
com.io7m.idstore.server.api.IdColor
- Record Components:
red- The red channelgreen- The green channelblue- The blue channel
A color.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleblue()Returns the value of thebluerecord component.com.io7m.cxbutton.core.CxColordarker(double factor) Darken this color.booleanIndicates whether some other object is "equal to" this one.doublegreen()Returns the value of thegreenrecord component.inthashCode()Returns a hash code value for this object.com.io7m.cxbutton.core.CxColorlighter(double factor) Lighten this color.doublered()Returns the value of theredrecord component.com.io7m.cxbutton.core.CxColorscale(double factor) Scale this color by the given factor.toString()Returns a string representation of this record class.
-
Constructor Details
-
IdColor
public IdColor(double red, double green, double blue) A color.- Parameters:
red- The red channelgreen- The green channelblue- The blue channel
-
-
Method Details
-
toString
-
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. -
hashCode
-
scale
public com.io7m.cxbutton.core.CxColor scale(double factor) Scale this color by the given factor. Factors less than 1.0 make the color darker. Factors greater than 1.0 make the color lighter.- Parameters:
factor- The factor- Returns:
- The color scaled
-
lighter
public com.io7m.cxbutton.core.CxColor lighter(double factor) Lighten this color.- Parameters:
factor- The factor- Returns:
- A lightened color
-
darker
public com.io7m.cxbutton.core.CxColor darker(double factor) Darken this color.- Parameters:
factor- The factor- Returns:
- A darkened color
-
red
-
green
-
blue
-