# base/colors (vanilla-engine 0.4.0)

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

색 이름 상수. (원본 base/colors.js)
- 원본 Colors 객체의 값을 연관 상수로 옮겼다. 원본처럼 "#rrggbb" 문자열이다.

## Colors (struct)

색상 값. (원본과 같이 문자열이다. Color::from 이나 set_fill_color 에 그대로 넘긴다)

예제: 바닐라색 문자열로 색 만들기

```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): 검은색. (#000000)
  - returns &'static str
- `pub const WHITE: &'static str = "#ffffff"` (static, since 0.3.2): 흰색. (#ffffff)
  - returns &'static str
- `pub const VANILLA: &'static str = "#f3e5ab"` (static, since 0.3.2): 바닐라색. (#f3e5ab)
  - returns &'static str
- `pub const DARK_VANILLA: &'static str = "#d1c1b2"` (static, since 0.3.2): 어두운 바닐라색. (#d1c1b2)
  - returns &'static str
- `pub const LIGHT_VANILLA: &'static str = "#f1e9d8"` (static, since 0.3.2): 밝은 바닐라색. (#f1e9d8)
  - returns &'static str
