rocketsplash-formats 0.2.2

Shared data types and serialization formats for Rocketsplash TUI animations
Documentation
// <FILE>crates/rocketsplash-formats/src/rgb.rs</FILE>
// <DESC>RGB color type for serialized formats</DESC>
// <VERS>VERSION: 1.0.0</VERS>
// <WCTX>Runtime library implementation</WCTX>
// <CLOG>Introduce Rgb type for format serialization</CLOG>

use serde::{Deserialize, Serialize};

/// RGB color for serialized assets.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct Rgb {
    pub r: u8,
    pub g: u8,
    pub b: u8,
}

impl Rgb {
    pub const fn new(r: u8, g: u8, b: u8) -> Self {
        Self { r, g, b }
    }
}

// <FILE>crates/rocketsplash-formats/src/rgb.rs</FILE>
// <VERS>END OF VERSION: 1.0.0</VERS>