bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
34.33k stars 3.35k forks source link

Create and use a unified example color palette #12176

Open alice-i-cecile opened 5 months ago

alice-i-cecile commented 5 months ago

What problem does this solve or what need does it fill?

The examples currently use a huge array of colors, for no good reason.

This is hard to modify, distracting and frequently ugly. This problem is particularly bad with text, with everything from fully saturated RED to BLACK to WHITE to 90% grey, 80% grey, GOLD and arbitrarily selected SRGB values being selected.

What solution would you like?

Add a simple bevy color palette to bevy_colors. Include our default clear color in there, and otherwise steal branding colors from the website. Look through the examples and slowly replace all other color palettes.

What alternative(s) have you considered?

Use the tailwind color palette everywhere. It won't be as coherent (since it's very large) or easy to change (since it has an external definition), but at least it won't be as 80s.

Additional context

Encountered during #12163. This work cannot be finalized until that PR is merged.

chompaa commented 4 months ago

I've extracted the following colors from the website, and annotated them with potential names:

Hopefully these can be of use.

rparrett commented 4 months ago

I think it would be helpful for discussion to make a distinction between what I would call a "theme" and a "palette."

A "theme" in my eyes might provide constants like:

bevy_light::PRIMARY_BUTTON, bevy_light::PRIMARY_BUTTON_BORDER, bevy_light::DESTRUCTIVE_BUTTON, bevy_dark::BACKGROUND, bevy_dark::FOREGROUND, or whatever. These would provide a semantic mapping to actual color values in a palette.

A "palette" might provide constants like:

bevy::BLUE_(50-950), bevy::PINK_(50-950), bevy::GREY_(50-950) with various shades of hues specific to Bevy's branding.

Is this issue just asking for a palette specific to Bevy's branding? Or are we trying to set up a theme for examples to follow?

alice-i-cecile commented 4 months ago

I'm primarily interested in a theme here. It would be really useful for improving the look and consistency of the examples, and reducing review time bikeshedding colors.

A palette seems like a necessary pre-requisite for that, and a good way to add colors for examples with unusual needs.

alice-i-cecile commented 1 month ago

When tackling this, we should swap our examples to use from_color where it exists, to follow-up https://github.com/bevyengine/bevy/pull/13791