node_launchpad/
style.rs

1// Copyright 2024 MaidSafe.net limited.
2//
3// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3.
4// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed
5// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
6// KIND, either express or implied. Please review the Licences for the specific language governing
7// permissions and limitations relating to use of the SAFE Network Software.
8
9use ratatui::{
10    Frame,
11    layout::Rect,
12    style::{Color, Style},
13    widgets::{Block, Clear},
14};
15
16pub const GHOST_WHITE: Color = Color::Indexed(15);
17pub const COOL_GREY: Color = Color::Indexed(246);
18pub const LIGHT_PERIWINKLE: Color = Color::Indexed(252);
19pub const VERY_LIGHT_AZURE: Color = Color::Indexed(75);
20pub const EUCALYPTUS: Color = Color::Indexed(115);
21pub const SIZZLING_RED: Color = Color::Indexed(197);
22pub const SPACE_CADET: Color = Color::Indexed(17);
23pub const DARK_GUNMETAL: Color = Color::Indexed(235); // 266 is incorrect
24pub const INDIGO: Color = Color::Indexed(24);
25pub const VIVID_SKY_BLUE: Color = Color::Indexed(45);
26pub const RED: Color = Color::Indexed(196);
27
28// Clears the area and sets the background color
29pub fn clear_area(f: &mut Frame<'_>, area: Rect) {
30    f.render_widget(Clear, area);
31    f.render_widget(Block::new().style(Style::new().bg(DARK_GUNMETAL)), area);
32}