mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-26 22:20:18 +00:00
Increased number of default colours.
This commit is contained in:
parent
1c1efcc714
commit
c4cd43968e
2 changed files with 11 additions and 5 deletions
|
@ -26,6 +26,8 @@ pub struct CanvasColours {
|
|||
|
||||
impl Default for CanvasColours {
|
||||
fn default() -> Self {
|
||||
let text_colour = Color::Gray;
|
||||
|
||||
CanvasColours {
|
||||
currently_selected_text_colour: Color::Black,
|
||||
currently_selected_bg_colour: Color::Cyan,
|
||||
|
@ -38,11 +40,11 @@ impl Default for CanvasColours {
|
|||
rx_style: Style::default().fg(STANDARD_FIRST_COLOUR),
|
||||
tx_style: Style::default().fg(STANDARD_SECOND_COLOUR),
|
||||
cpu_colour_styles: Vec::new(),
|
||||
border_style: Style::default().fg(Color::Gray),
|
||||
border_style: Style::default().fg(text_colour),
|
||||
highlighted_border_style: Style::default().fg(Color::LightBlue),
|
||||
text_style: Style::default().fg(Color::Gray),
|
||||
widget_title_style: Style::default().fg(Color::Gray),
|
||||
graph_style: Style::default().fg(Color::Gray),
|
||||
text_style: Style::default().fg(text_colour),
|
||||
widget_title_style: Style::default().fg(text_colour),
|
||||
graph_style: Style::default().fg(text_colour),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,10 +38,14 @@ pub fn gen_n_styles(num_to_gen: i32) -> Vec<Style> {
|
|||
Style::default().fg(Color::LightCyan),
|
||||
Style::default().fg(Color::LightGreen),
|
||||
Style::default().fg(Color::LightBlue),
|
||||
Style::default().fg(Color::Red),
|
||||
Style::default().fg(Color::Cyan),
|
||||
Style::default().fg(Color::Green),
|
||||
Style::default().fg(Color::Blue),
|
||||
];
|
||||
|
||||
let mut h: f32 = 0.4; // We don't need random colours... right?
|
||||
for _i in 0..(num_to_gen - 6) {
|
||||
for _i in 0..(num_to_gen - 10) {
|
||||
h = gen_hsv(h);
|
||||
let result = hsv_to_rgb(h, 0.5, 0.95);
|
||||
colour_vec.push(Style::default().fg(Color::Rgb(result.0, result.1, result.2)));
|
||||
|
|
Loading…
Reference in a new issue