Bevy Colour Palettes
A Rust library providing a collection of popular colour palettes for the Bevy game engine, with utilities for interacting with them.
-
Create colour palettes: Create flexible colour palettes with the
palette!macro -
Pre-defined Colour Palettes: Includes several popular colour palettes from Lospec:
-
Visual Documentation: Each palette includes custom HTML when generating a Rustdoc to showcase the available colours. Integrates nicely with IDE doc previews
Installation
Add this to your Cargo.toml:
[]
= "0.2.0"
Usage
Using Existing Palettes
use *;
use Dawnbringer16;
Creating Custom Palettes
You can create your own colour palettes using the palette! macro:
use palette;
palette!;
// Now you can use your palette just like the built-in ones:
let hero_colour = HERO;
let enemy_colour = enemy;
let bg_colour = get.unwrap;
// Iterate over all colours
for colour in &MyGamePalette
Bevy Compatibility
| version | bevy |
|---|---|
| 0.2 | 0.17 |
| 0.1 | 0.16 |