Derive Default for Color

This commit is contained in:
Clark Moody 2020-04-02 15:24:40 -05:00
parent 56ce01e262
commit ea3b7b5282

View File

@ -2,7 +2,7 @@
use palette::rgb::Srgba; use palette::rgb::Srgba;
/// A color in the sRGB color space. /// A color in the sRGB color space.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq, Default)]
pub struct Color { pub struct Color {
/// Red component, 0.0 - 1.0 /// Red component, 0.0 - 1.0
pub r: f32, pub r: f32,