Color3¶
A color value comprised of red, green, and blue components.
Description¶
The Color3 data type describes a color using red, green, and blue components in the range of 0 to 1. Unlike the BrickColor data type which describes named colors, Color3 is used for precise coloring of objects on screen through properties like BasePart.Color and GuiObject.BackgroundColor3.
Constructors¶
new Supported Returns a Color3 with the given red, green, and blue values.
Returns a Color3 with the given red, green, and blue values. The parameters should be within the range of 0 to 1.
fromRGB Supported Returns a Color3 from given components within the range of 0 to 255.
fromHSV Supported Returns a Color3 from the given hue, saturation, and value components.
fromHex Supported Returns a Color3 from a given hex value.
Returns a Color3 from a given hex value.
Returns a new Color3 from a six- or three-character hexadecimal
format, case insensitive. A preceding hashtag (#) is ignored, if
present. This function interprets the given string as a typical web hex
color in the format RRGGBB or RGB (shorthand for RRGGBB). For
example, #FFAA00 produces an orange color and is the same as #FA0.
Properties¶
Methods¶
Lerp Supported Returns a Color3 interpolated between two colors.
Returns a Color3 interpolated between two colors. The alpha
value should be within the range of 0 to 1.
ToHSV Supported Returns the hue, saturation, and value of a Color3.
Returns the hue, saturation, and value of a Color3. This function is the inverse operation of the Color3.fromHSV() constructor.
ToHex Not yet Returns the hex code of a Color3.
Returns the hex code of a Color3.
Converts the color to a six-character hexadecimal string representing the
color in the format RRGGBB. It is not prefixed with an octothorpe (#).
The returned string can be provided to Color3.fromHex() to produce the original color.
Functions¶
toHSV Supported Returns the hue, saturation, and value of a Color3.
Returns the hue, saturation, and value of a Color3. This function is the inverse operation of the Color3.fromHSV() constructor.
Nova binding inventory¶
| Library | Members |
|---|---|
fromHSV, fromHex, fromRGB, new |
Lerp, ToHSV, b, g, lerp, r |
Roblox reference: Color3