Organizing Colors Based On RGB values

I am currently working on a building game. One problem I’m running into is if a player buys a custom color, the colors are all out of order in the inventory. I’m trying to organize based on RGB color codes so it’s not all whack and inconvenient. What would be the most effective way to do this?

Example of what I’m trying to achieve:

You can control based on Name. You’d have to do a listlayout, with the layout type set to name. Afterwards, you’d have to manually input the names. Name the first one “1”, the second, “12”, the next “123” etc. . .

This will ensure it is in the correct order. When they add a new color, name it appropriately.

If you go off the following colors, you can get their respective numbers. Just loop through them, and check which one the custom color relates to. Then, name it the respective name.

Edit:

You can try using

BrickColor.new(temporaryColor3Value)

to get the closest (by converting it into the nearest brick color). I believe that is how that constructor work. . .

1 Like

Ok thanks. I’ll try that

30 characters

1 Like