rizlib/color/
mod.rs

1/*!
2 * Color structures used in Rizline's files.
3 *
4 * There are two kinds of color structures found in Rizline's game data:
5 * - [`ByteColor`][crate::color::byte_color::ByteColor] - color structures made of four integer values ranging from `0` to `255`.
6 * - [`FloatColor`][crate::color::float_color::FloatColor] - color structures made of four floating point values ranging from `0.0` to `1.0`.
7 */
8
9pub mod byte_color;
10pub mod float_color;
11
12/// Trait for common color methods.
13///
14/// This trait is implemented for [`ByteColor`][byte_color::ByteColor] and [`FloatColor`][float_color::FloatColor].
15pub trait Color {
16    fn hex_rgba_string(&self) -> String;
17    fn lightness(&self) -> f64;
18}