own_art/
lib.rs

1#![allow(dead_code)]
2#![allow(unused)]
3
4//!# Art
5//! A library for modeling artistic concepts
6
7pub use crate::kinds::PrimaryColor;
8pub use crate::kinds::SecondaryColor;
9pub use crate::utils::mix;
10
11pub mod kinds {
12
13    ///The primary colors according to the RYB color model
14    #[derive(Debug)]
15    pub enum PrimaryColor {
16        Red,
17        Yellow,
18        Blue,
19    }
20
21    ///The secondary colors according to the RYB color model
22    #[derive(Debug)]
23    pub enum SecondaryColor {
24        Orange,
25        Green,
26        Purple,
27    }
28}
29
30pub mod utils {
31    use crate::kinds::*;
32
33    ///Combines two primary colors in equal amounts to create
34    /// a secondary color
35    pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
36        SecondaryColor::Green
37    }
38}