ReadonlyaAlpha (transparency) component of the color (0.0 to 1.0) - readonly
Blue component of the color (0.0 to 1.0) - mutable
Green component of the color (0.0 to 1.0) - mutable
Red component of the color (0.0 to 1.0) - mutable
Adds another vector to this color.
The vector to add
This color instance for method chaining
Gets the component value at the specified index.
The index (0=r, 1=g, 2=b, 3=a)
The component value at the specified index
Creates a copy of this color.
A new mutable color instance with the same values
Copies components from another vector.
The source vector to copy from
This color instance for method chaining
Calculates the cross product with another vector.
The vector to calculate cross product with
This color instance for method chaining
Divides this color by a scalar value.
The scalar value to divide by
This color instance for method chaining
Divides this color by another vector component-wise.
The vector to divide by
This color instance for method chaining
Calculates the dot product with another vector.
The vector to calculate dot product with
The dot product result
Converts the color to a flat array of numbers.
Array containing the color components
Checks if this is a dummy/placeholder color instance.
True if this is a dummy color, false otherwise
Checks if this color is equal to another vector within a given tolerance.
The vector to compare with
The tolerance for comparison
True if the colors are equal within the tolerance
Checks if this color is strictly equal to another vector.
The vector to compare with
True if the colors are exactly equal
Calculates the length (magnitude) of the color vector.
The length of the color vector
Calculates the squared length of the color vector.
The squared length of the color vector
Calculates the distance to another vector.
The target vector
The distance to the target vector
Multiplies this color by a scalar value.
The scalar value to multiply by
This color instance for method chaining
Multiplies this color by another vector component-wise.
The vector to multiply by
This color instance for method chaining
Normalizes the color vector to unit length.
This color instance for method chaining
Gets the raw typed array representation of the color data.
The underlying typed array containing color components
Sets the value of a component at the specified index.
The index (0=r, 1=g, 2=b)
The new value for the component
This color instance for method chaining
Sets the RGB components of the color.
The red component value
The green component value
The blue component value
This color instance for method chaining
Subtracts another vector from this color.
The vector to subtract
This color instance for method chaining
Returns a string representation of the color.
String representation of the color
Returns an approximate string representation of the color with limited precision.
Approximate string representation of the color
Mutable RGB color interface with alpha channel support. Represents a color with red, green, blue components and readonly alpha. RGB components can be modified, but alpha remains readonly.