ransbachm_testing_art/
lib.rs

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