ibr4_something/
lib.rs

1
2
3//! # Art
4//!
5//! A library for modeling artistics concepts.
6
7
8pub use self::kinds::PrimaryColor;
9pub use self::kinds::SecondaryColor;
10pub use self::utils::mix;
11
12
13pub mod kinds {
14    pub enum PrimaryColor {
15        Red,
16        Yellow,
17        Blue
18    }
19
20    /// The secondary colors according to the RYB color model.
21
22    pub enum SecondaryColor {
23        Orange,
24        Green,
25        Purple
26    }
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    
36
37    pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
38        SecondaryColor::Orange
39    } 
40}