[−][src]Function mandalas::util::flag_hard_alpha_to_rgb
pub fn flag_hard_alpha_to_rgb(flag: &[[f64; 3]], id_alpha: [f64; 2]) -> [f64; 3]
Translate a colour point and alpha into an RGB colour point from the specified flag colourset.
Examples
assert_eq!(flag_hard_alpha_to_rgb(FLAG_ACE, [0f64, 1f64]), FLAG_ACE[0]); assert_eq!(flag_hard_alpha_to_rgb(FLAG_ACE, [0.2 , 1f64]), FLAG_ACE[0]); assert_eq!(flag_hard_alpha_to_rgb(FLAG_ACE, [0.4 , 1f64]), FLAG_ACE[1]); assert_eq!(flag_hard_alpha_to_rgb(FLAG_ACE, [0.4 , 0.5 ]), [FLAG_ACE[1][0] * 0.5, FLAG_ACE[1][1] * 0.5, FLAG_ACE[1][2] * 0.5]);