Color3
Color3
Overview
Description
The Color3
class represents colors in RGB (Red, Green, Blue) format with numeric values between 0 and 255. It is commonly used to define colors for various objects or user interface elements in many applications.
Properties
R
number
Represents the red component of the color. The value lies in the range [0, 255].
Code Samples
G
number
Represents the green component of the color. The value lies in the range [0, 255].
Code Samples
B
number
Represents the blue component of the color. The value lies in the range [0, 255].
Code Samples
Constructors
new
Creates a new Color3
instance with the specified red, green, and blue values.
Parameters
number red
The red component of the color (between 0 and 255).
number green
The green component of the color (between 0 and 255).
number blue
The blue component of the color (between 0 and 255).
Return
Color3
A new color object with the specified red, green, and blue values.
Code Samples
fromRGB
Creates a new Color3
instance using RGB values scaled from the range 0 to 255.
Parameters
number red
The red component of the color (between 0 and 255).
number green
The green component of the color (between 0 and 255).
number blue
The blue component of the color (between 0 and 255).
Return
Color3
A new color object with the specified red, green, and blue values, scaled to the range [0, 255].
Code Samples
Methods
Last updated