Package com.io7m.idstore.server.api

# Record Class IdColor

java.lang.Object
java.lang.Record
com.io7m.idstore.server.api.IdColor

Record Components:
  `red` - The red channel
  `green` - The green channel
  `blue` - The blue channel

public record IdColor(double red, double green, double blue) extends Record
A color.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdColor(double red, double green, double blue)`
  A color.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `blue()`
  Returns the value of the `blue` record component.
  `com.io7m.cxbutton.core.CxColor`
  `darker(double factor)`
  Darken this color.
  `boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `double`
  `green()`
  Returns the value of the `green` record component.
  `int`
  `hashCode()`
  Returns a hash code value for this object.
  `com.io7m.cxbutton.core.CxColor`
  `lighter(double factor)`
  Lighten this color.
  `double`
  `red()`
  Returns the value of the `red` record component.
  `com.io7m.cxbutton.core.CxColor`
  `scale(double factor)`
  Scale this color by the given factor.
  `String`
  `toString()`
  Returns a string representation of this record class.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IdColor

    public IdColor(double red, double green, double blue)
    A color.
    Parameters:
      `red` - The red channel
      `green` - The green channel
      `blue` - The blue channel

- ## Method Details

  - ### toString

    public String 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.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### equals

    public boolean equals(Object o)
    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 '=='.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### hashCode

    public int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### 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

    public double red()
    Returns the value of the `red` record component.
    Returns:
      the value of the `red` record component

  - ### green

    public double green()
    Returns the value of the `green` record component.
    Returns:
      the value of the `green` record component

  - ### blue

    public double blue()
    Returns the value of the `blue` record component.
    Returns:
      the value of the `blue` record component