# base/colors (vanilla-engine 0.4.0)

> https://vanillapunch.com/docs/vanilla-engine/0.4.0/api/base/colors/

Color name constants. (the original base/colors.js)
- The values of the original Colors object moved to associated constants. They are "#rrggbb" strings as in the original.

## Colors (struct)

Color value. (a string as in the original. Pass it as is to Color::from or set_fill_color)

Example: Create a color from the vanilla color string

```rust
use vanilla::{Color, Colors};

let background = Color::create_from_hex(Colors::VANILLA);
assert_eq!(background.to_hex_string(), Colors::VANILLA);
assert_eq!(Color::from(Colors::BLACK), Color::black());
```

- `pub const BLACK: &'static str = "#000000"` (static, since 0.3.2): Black. (#000000)
  - returns &'static str
- `pub const WHITE: &'static str = "#ffffff"` (static, since 0.3.2): White. (#ffffff)
  - returns &'static str
- `pub const VANILLA: &'static str = "#f3e5ab"` (static, since 0.3.2): Vanilla. (#f3e5ab)
  - returns &'static str
- `pub const DARK_VANILLA: &'static str = "#d1c1b2"` (static, since 0.3.2): Dark vanilla. (#d1c1b2)
  - returns &'static str
- `pub const LIGHT_VANILLA: &'static str = "#f1e9d8"` (static, since 0.3.2): Light vanilla. (#f1e9d8)
  - returns &'static str
