[][src]Function martin_art_lib::utils::mix

pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor

Combines two primary colors in equal amounts to create a secondary color.

Examples

use martin_art_lib::PrimaryColor;
use martin_art_lib::SecondaryColor;
use martin_art_lib::mix;
 
assert_eq!(SecondaryColor::Orange, mix(PrimaryColor::Yellow, PrimaryColor::Red));
use martin_art_lib::utils::mix;
use martin_art_lib::kinds::SecondaryColor;
use martin_art_lib::kinds::PrimaryColor;
 
assert_eq!(SecondaryColor::Green, mix(PrimaryColor::Blue, PrimaryColor::Yellow));