class Color3
Creates a new Color3 object from red, green, blue values, all between 0 and 1.
Name | Type | Description | |
---|---|---|---|
optional | r | number | |
optional | g | number | |
optional | b | number |
Returns a string with the Color3 current values.
Returns the string "Color3".
Returns the Color3 hash code.
Stores in the passed array from the passed starting index the red, green, blue values as successive elements.
Returns the Color3.
Name | Type | Description | |
---|---|---|---|
array | FloatArray | ||
optional | index | number |
Returns a new Color4 object from the current Color3 and the passed alpha.
Name | Type | Description | |
---|---|---|---|
optional | alpha | number |
Returns a new array populated with 3 numeric elements : red, green and blue values.
Returns the luminance value (float).
Multiply each Color3 rgb values by the passed Color3 rgb values in a new Color3 object.
Returns this new object.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 |
Multiply the rgb values of the Color3 and the passed Color3 and stores the result in the object "result".
Returns the current Color3.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 | ||
result | Color3 |
Boolean : True if the rgb values are equal to the passed ones.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 |
Boolean : True if the rgb values are equal to the passed ones.
Name | Type | Description | |
---|---|---|---|
r | number | ||
g | number | ||
b | number |
Multiplies in place each rgb value by scale.
Returns the updated Color3.
Name | Type | Description | |
---|---|---|---|
scale | number |
Multiplies the rgb values by scale and stores the result into "result".
Returns the unmodified current Color3.
Name | Type | Description | |
---|---|---|---|
scale | number | ||
result | Color3 |
Returns a new Color3 set with the added values of the current Color3 and of the passed one.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 |
Stores the result of the addition of the current Color3 and passed one rgb values into "result".
Returns the unmodified current Color3.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 | ||
result | Color3 |
Returns a new Color3 set with the subtracted values of the passed one from the current Color3 .
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 |
Stores the result of the subtraction of passed one from the current Color3 rgb values into "result".
Returns the unmodified current Color3.
Name | Type | Description | |
---|---|---|---|
otherColor | Color3 | ||
result | Color3 |
Returns a new Color3 copied the current one.
Copies the rgb values from the source in the current Color3.
Returns the updated Color3.
Name | Type | Description | |
---|---|---|---|
source | Color3 |
Updates the Color3 rgb values from the passed floats.
Returns the Color3.
Name | Type | Description | |
---|---|---|---|
r | number | ||
g | number | ||
b | number |
Updates the Color3 rgb values from the passed floats.
Returns the Color3.
Name | Type | Description | |
---|---|---|---|
r | number | ||
g | number | ||
b | number |
Returns the Color3 hexadecimal code as a string.
Returns a new Color3 converted to linear space.
Converts the Color3 values to linear space and stores the result in "convertedColor".
Returns the unmodified Color3.
Name | Type | Description | |
---|---|---|---|
convertedColor | Color3 |
Returns a new Color3 converted to gamma space.
Converts the Color3 values to gamma space and stores the result in "convertedColor".
Returns the unmodified Color3.
Name | Type | Description | |
---|---|---|---|
convertedColor | Color3 |
Creates a new Color3 from the string containing valid hexadecimal values.
Name | Type | Description | |
---|---|---|---|
hex | string |
Creates a new Vector3 from the startind index of the passed array.
Name | Type | Description | |
---|---|---|---|
array | ArrayLike<number> | ||
optional | offset | number |
Creates a new Color3 from integer values ( < 256).
Name | Type | Description | |
---|---|---|---|
r | number | ||
g | number | ||
b | number |
Creates a new Color3 with values linearly interpolated of "amount" between the start Color3 and the end Color3.
Name | Type | Description | |
---|---|---|---|
start | Color3 | ||
end | Color3 | ||
amount | number |