A class representing an RGB color.
A Color instance is represented by RGB components in the linear working color space, which defaults to LinearSRGBColorSpace. Inputs conventionally using SRGBColorSpace (such as hexadecimals and CSS strings) are converted to the working color space automatically.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Anyclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Adds the RGB values of the given color to the RGB values of this color
Adds the RGB values of the given color to the RGB values of this color
Attributes
Adds the RGB values of the given colors and stores the result in this instance
Adds the RGB values of the given colors and stores the result in this instance
Attributes
Adds the given scalar value to the RGB values of this color
Adds the given scalar value to the RGB values of this color
Attributes
Transforms this color with the given 3x3 matrix
Transforms this color with the given 3x3 matrix
Attributes
Converts this color from Linear to SRGB color space
Converts this color from Linear to SRGB color space
Attributes
Converts this color from SRGB to Linear color space
Converts this color from SRGB to Linear color space
Attributes
Copies the values of the given color to this instance
Copies the values of the given color to this instance
Attributes
Copies given color into this color, and converts from Linear to SRGB color space
Copies given color into this color, and converts from Linear to SRGB color space
Attributes
Copies given color into this color, and converts from SRGB to Linear color space
Copies given color into this color, and converts from SRGB to Linear color space
Attributes
Returns true if this color equals the given one
Returns true if this color equals the given one
Attributes
Sets this color's RGB components from the given array
Sets this color's RGB components from the given array
Attributes
Sets the components of this color from the given buffer attribute
Sets the components of this color from the given buffer attribute
Attributes
Converts the colors RGB values into the HSL format and stores them into the given target object
Converts the colors RGB values into the HSL format and stores them into the given target object
Attributes
Returns the hexadecimal value of this color
Returns the hexadecimal value of this color
Attributes
Returns the hexadecimal value of this color as a string
Returns the hexadecimal value of this color as a string
Attributes
Returns the RGB values of this color and stores them into the given target object
Returns the RGB values of this color and stores them into the given target object
Attributes
Returns the value of this color as a CSS style string
Returns the value of this color as a CSS style string
Attributes
Returns a new color with copied values from this instance
Returns a new color with copied values from this instance
Attributes
Linearly interpolates this color's RGB values toward the RGB values of the given color
Linearly interpolates this color's RGB values toward the RGB values of the given color
Attributes
Linearly interpolates between the given colors and stores the result in this instance
Linearly interpolates between the given colors and stores the result in this instance
Attributes
Linearly interpolates this color's HSL values toward the HSL values of the given color
Linearly interpolates this color's HSL values toward the HSL values of the given color
Attributes
Multiplies the RGB values of the given color with the RGB values of this color
Multiplies the RGB values of the given color with the RGB values of this color
Attributes
Multiplies the given scalar value with the RGB values of this color
Multiplies the given scalar value with the RGB values of this color
Attributes
Adds the given HSL values to this color's values
Adds the given HSL values to this color's values
Attributes
Sets the color's components from the given values
Sets the color's components from the given values
Attributes
Sets this color from a color name
Sets this color from a color name
Attributes
Sets the color's RGB components from the given 3D vector
Sets the color's RGB components from the given 3D vector
Attributes
Sets this color from HSL values
Sets this color from HSL values
Attributes
Sets this color from a hexadecimal value
Sets this color from a hexadecimal value
Attributes
Sets this color from RGB values
Sets this color from RGB values
Attributes
Sets the color's components to the given scalar value
Sets the color's components to the given scalar value
Attributes
Sets this color from a CSS-style string
Sets this color from a CSS-style string
Attributes
Subtracts the RGB values of the given color from the RGB values of this color
Subtracts the RGB values of the given color from the RGB values of this color
Attributes
Returns the RGB components as an array
Returns the RGB components as an array
Attributes
Returns the hexadecimal value (serialization result)
Returns the hexadecimal value (serialization result)
Attributes
Inherited methods
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object