module

Ctop::TUI::Style

Color and style helpers for TUI drawing.

Class methods

row_style(selected : Bool) : Tuple(Termisu::Color, Termisu::Attribute)

Row foreground color and attribute based on selection state.

Source
select_or_color(selected : Bool, color : Bool, colored : Termisu::Color) : Termisu::Color

Return cyan if selected, colored value if color enabled, else white.

Source
state_char(state : Hardware::PID::Stat::State) : String

Convert process state to single character.

Source
state_color(state : Hardware::PID::Stat::State) : Termisu::Color

Get color for process state.

Source
threshold_color(percent : Float64) : Termisu::Color

Get color for percent-based thresholds (green < 50, yellow < 80, red).

Source