config/errors/invalid_color.rs
1use thiserror::Error;
2
3/// A invalid color error.
4#[derive(Error, Copy, Clone, Debug, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum InvalidColorError {
7 /// The indexed color is invalid.
8 #[error("Index must be between 0-255")]
9 Indexed,
10 /// The red color is invalid.
11 #[error("Red color value must be between 0-255")]
12 Red,
13 /// The green color is invalid.
14 #[error("Green color value must be between 0-255")]
15 Green,
16 /// The blue color is invalid.
17 #[error("Blue color value must be between 0-255")]
18 Blue,
19 /// An unknown color was used.
20 #[error("Unknown color value")]
21 Invalid,
22}