Color3
Represents a color in RGB space.
Fields
The red component of the color.
The green component of the color.
The blue component of the color.
Properties
The red component of the color, in the range [0.0, 1.0].
The green component of the color, in the range [0.0, 1.0].
The blue component of the color, in the range [0.0, 1.0].
Functions
Converts the color to a 32-bit unsigned integer in RGB format.
Returns: The color as a 32-bit unsigned integer in RGB format.
Creates a Color from HSV (Hue, Saturation, Value) components.
- hue
- The hue component, in the range [0.0, 1.0].
- saturation
- The saturation component, in the range [0.0, 1.0].
- value
- The value component, in the range [0.0, 1.0].
Returns: >The resulting Color.
Converts the color to a hexadecimal (HTML) string representation.
Returns: The hexadecimal string representation of the color, in the format RRGGBB.
Sets this color's components from a hexadecimal string (with or without a leading #).
- hex
- A 6-character RRGGBB hex string.
Returns: This color, with components updated to match .
Creates a Color from a hexadecimal string (with or without a leading #).
- hex
- A 6-character RRGGBB hex string.
Returns: The resulting Color.
Sets this color from HSV (Hue, Saturation, Value) components.
- hue
- The hue component, in the range [0.0, 1.0].
- saturation
- The saturation component, in the range [0.0, 1.0].
- value
- The value component, in the range [0.0, 1.0].
Returns: This color, with components updated to match the HSV input.
Randomizes this color's RGB components.
Returns: This color, with randomized components.