2
0
Fork 0
mirror of https://github.com/ClementTsang/bottom synced 2025-02-15 12:48:28 +00:00

Add stock 6 colours

This commit is contained in:
ClementTsang 2019-12-26 19:08:43 -05:00
parent 55b5e5abd5
commit f25bb68662

View file

@ -52,7 +52,14 @@ pub struct CanvasData {
/// Generates random colours.
/// Strategy found from https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
fn gen_n_colours(num_to_gen: i32) -> Vec<Color> {
let mut colour_vec: Vec<Color> = Vec::new();
let mut colour_vec: Vec<Color> = vec![
Color::LightBlue,
Color::LightYellow,
Color::Red,
Color::Green,
Color::LightCyan,
Color::LightMagenta,
];
let mut h: f32 = 0.4; // We don't need random colours... right?
for _i in 0..num_to_gen {