Creates an instance of Color.
Optionalr: number = 1The red component.
Optionalg: number = 1The green component.
Optionalb: number = 1The blue component.
Optionala: number = 1The alpha component.
Protected_Protected_Protected_Gets the alpha component of the color.
Sets the alpha component of the color.
The new alpha value.
Gets the blue component of the color.
Sets the blue component of the color.
The new blue value.
Gets the green component of the color.
Sets the green component of the color.
The new green value.
Gets the red component of the color.
Sets the red component of the color.
The new red value.
StaticclassProtecteddeserializeDeserializes the color's state from a JSON object.
The JSON object to deserialize from.
ProtectedgetProtectedserializeSets the RGBA values of the color.
Optionalr: number = 1The red component.
Optionalg: number = 1The green component.
Optionalb: number = 1The blue component.
Optionala: number = 1The alpha component.
Serializes the color's state to a JSON object.
Converts the color to a gl-matrix vec3.
Returns the internal gl-matrix vec4.
StaticcreateCreates a new Color instance from a JSON data object.
The JSON object to deserialize from.
Staticlerp
A class representing a color using RGBA values, backed by a gl-matrix vec4. This class provides methods for manipulating and converting colors.