fractal_gen/image/
pixel.rs

1#[derive(Debug, Clone, Copy)]
2
3/// The structure of the RGB Pixel.
4pub struct Pixel {
5    /// The color red.
6    pub r: u8,
7    /// The color green.
8    pub g: u8,
9    /// The color blue.
10    pub b: u8
11}
12
13impl Pixel {
14
15    /// Create an RGB Pixel.
16    pub fn new(r: u8, g: u8, b: u8) -> Pixel {
17        Pixel {r: r, g: g, b: b}
18    }
19}
20