As a Roblox developer, it is currently a little bit tedious to have to use RGB or HSV when it comes to frequently used colors. Allow me to explain:
For example, if I wanted to set a text label’s background color to black, it seems quite redundant that I would have to type
Color3.fromRGB(0, 0, 0), or any other variants, just to set a property to this common color.
For very popular hues; such as black, red, blue, white, and etc.; I would at least expect that they would have their own, unique syntax. For instance, BrickColor3 can be set with a string (such as “Institutional white”). Similarly, I would request the ability to do
TextLabel.TextColor3 = "Black".
“Color words” can either be keywords (i.e.
workspace with a special, blue highlight) or just strings (i.e.“Fossil” for BrickColor3).
If anyone is familiar with colors in CSS, you can use words like “white”, “red”, “blue”, “black”, etc. as alternatives to typing RGB or HEX.
All three methods do the same thing (set the background color to pure black), but simply stating the word is the easiest way. I am requesting that Roblox’s Lua can accept “Black” as an alternative to
Color3.fromRGB(0, 0, 0).
An example list of the colors (RGB) that should have word counterparts:
- Red (255, 0, 0)
- Green (0, 255, 0)
- Blue (0, 0, 255)
- Yellow (255, 255, 0)
- Pink (255, 0, 255)
- Cyan (0, 255, 255)
- Black (0, 0, 0)
- White (255, 255, 255)
- Various shades of gray (100, 100, 100) (200, 200, 200) etc.
I understand that you can define variables and (for example,
local red = Color3.fromRGB(255, 0, 0)), but as an analogy, the keyword
workspace exists even when you can set that as a variable. Why? It’s downright easier to use than
game.Workspace! In programming, a method, a snippet of code, or even a simple math operation that is commonly used a lot gets revamped and made easier to use.
x = x + y(which is simple enough) can also be written as
x += y(a lot shorter, a lot easier). (Find out more here)
Basically, all use cases are scripting-related.
local button = script.Parent button.MousEnter:Connect(function() button.BackgroundColor3 = "Black" Button.TextColor3 = "White" end) button.MousEnter:Connect(function() button.BackgroundColor3 = "White" Button.TextColor3 = "Black" end)
If this feature was to be added, it would improve my development experience because scripting (at least, personally) would be a lot quicker and more efficient. As a UI designer, I tend to refer a lot to colors, and I can guarantee that most of them are the exact same colors as the ones used by other developers. The ability to simply write the word for a color is what I am requesting. After all, scripting is achieving something with the least effort, but with maximum efficiency and speed.
Also, do keep in mind that color does not only affect UIs, but also building; therefore, builders and UI designers would be the most benefit from this. But anyone who regularly accesses color would find this feature very handy.
This would bring us, developers, one step closer to paying less attention to basic things (like referencing color) and being more attentive towards important matters at hand.
I hope others find this as useful as I do,
and thank you for reading!