Color3 math operations

As a developer, it can be very annoying to operate on Color3s since you have to deconstruct and reconstruct them each time you want to manipulate their data. So I want math operations.

Additive operators are simple, they just add the values of each color

[Color3] Color3 + Color3
[Color3] Color3 - Color3

Multiplicative operators multiply the scalar RGB, not the 0-255 range.

[Color3] Color3 * Color3
[Color3] Color3 / Color3
[Color3] Color3 * number
[Color3] Color3 / number

Modulo, unary, and exponentiation seem unnecessary and it’s not exactly clear what they should do.

This will make code that manipulates Color3 data significantly easier to read and write.

3 Likes

This was previously talked about in this topic: Color3 values should support math operations

1 Like