godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Generate random color for Project Tags #11102

Open CubeOfCheese opened 1 week ago

CubeOfCheese commented 1 week ago

Describe the project you are working on

I have a lot of projects with the same name in different folders. and want to visually organize them better so I can make sure I'm launching the right one.

I'm a highschool teacher teaching godot to 4 periods. So I create the same project with the same name but in each class's folder.

Describe the problem or limitation you are having in your project

I thought adding a tag would help me quickly identify which project was which, but since the only difference is the text displayed, it doesn't offer that much visual differentiation.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I would like for every tag to have a different color. I'm sure some people would like to be able to pick the color themselves, but I would be satisfied with randomly generated colors.

This would help with being able to quickly visually differentiate between projects.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Screenshot 2024-11-05 at 1 01 43 PM

I want that little blue vertical bar to be different colors.

Purely random colors is probably not the proper implementation. It should probably pick from, maybe even cycle through a list of predetermined colors. That way they are always distinctive.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think so. I don't think scripts can modify the launch project window

Is there a reason why this should be core and not an add-on in the asset library?

I don't think addons can modify the project launch window either.

KoBeWi commented 1 week ago

Currently the colors are pseudo-random based on the tag name.

CubeOfCheese commented 1 week ago

Hmm so is the problem that my tags are all similarly named?

Screenshot 2024-11-05 at 3 45 08 PM
fire commented 1 week ago

I think the numbers are ignored when hashing. This sounds like a bug.

KoBeWi commented 6 days ago

The color is set here: https://github.com/godotengine/godot/blob/87318a2fb7fffeb72adca934e31915be077c3d1f/editor/project_manager/project_tag.cpp#L59 Seems like the hash is very similar if the strings are short.