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:
parent
55b5e5abd5
commit
f25bb68662
1 changed files with 8 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue