2019-09-19 15:01:12 +02:00
|
|
|
/// A color in the sRGB color space.
|
2019-09-14 20:54:50 +02:00
|
|
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
2019-09-19 15:01:12 +02:00
|
|
|
#[allow(missing_docs)]
|
2019-09-14 20:54:50 +02:00
|
|
|
pub struct Color {
|
|
|
|
|
pub r: f32,
|
|
|
|
|
pub g: f32,
|
|
|
|
|
pub b: f32,
|
|
|
|
|
pub a: f32,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Color {
|
2019-09-19 15:01:12 +02:00
|
|
|
/// The black color.
|
2019-09-14 20:54:50 +02:00
|
|
|
pub const BLACK: Color = Color {
|
|
|
|
|
r: 0.0,
|
|
|
|
|
g: 0.0,
|
|
|
|
|
b: 0.0,
|
|
|
|
|
a: 1.0,
|
|
|
|
|
};
|
|
|
|
|
}
|