Expand description
A collection of popular color palettes, with utilities interacting with them.
§Creating palettes
The palette! macro is available for generating additional colour palettes with convenience methods:
use weirdboi_bevy_colour::palette;
palette!(MyNewPalette {
"someColor": (0.5, 0.5, 0.5),
"anotherColor": (0.75, 0.23, 0.0),
});
// Access by constant:
MyNewPalette::SOME_COLOR;
// Access by method:
MyNewPalette::some_color();
// Look up colour by case and format insensitive name:
assert_eq!(MyNewPalette::get("someColor"), MyNewPalette::get("SOME_COLOR"));
// Iterate over all the colours in a palette:
for color in &MyNewPalette {
// color is a bevy::color::Color instance
println!("{:?}", color);
}§Using existing palettes
weirdboi_bevy_colour provides a collection of popular colour palettes, including:
§What is each colour?
If you want to see a preview of each colour, check the rustdoc for each palette. The doc for the palette will contain a grid of available colours, and each colour constant will contain a colour bar.
Macros§
- palette
- Generate a palette struct and implementation
Structs§
- Dawnbringer16
- The Dawnbringer16 palette, containing 16 colors.
- Dawnbringer32
- The Dawnbringer32 palette, containing 32 colors.
- Nanner
Pancakes - The NannerPancakes palette, containing 32 colors.
- Resurrect32
- The Resurrect32 palette, containing 32 colors.
- Resurrect64
- The Resurrect64 palette, containing 64 colors.