module

Cresium::Theme

Application color palette, resolved against the color mode the terminal actually supports (Mode).

Constants

ALERT = "#f07178"
ANSI_FALLBACK = {RUNNING => Tui::ANSI::Color::BRIGHT_GREEN, PAUSED => Tui::ANSI::Color::BRIGHT_YELLOW, ALERT => Tui::ANSI::Color::BRIGHT_RED, NEUTRAL => Tui::ANSI::Color::BRIGHT_WHITE, MUTED => Tui::ANSI::Color::BRIGHT_BLACK}

16-color ANSI equivalent of each palette color, used under Mode::Ansi.

MUTED = "#5c6773"
NEUTRAL = "#e6e1cf"
PAUSED = "#ffb454"
RUNNING = "#aad94c"

Class methods

mode

Color rendering mode, settable from the CLI (--no-color, --tty). Only affects tui_color / style.

Source
mode=(mode : Mode)

Color rendering mode, settable from the CLI (--no-color, --tty). Only affects tui_color / style.

Source
stopwatch_color(stopwatch : Stopwatch) : String

Color for a Stopwatch's current state (running, zero, paused).

Source
style(hex : String) : Tui::Style

Shortcut for the common case: a Tui::Style with only a foreground color from the palette, no background or attributes.

Source
timer_color(timer : Timer, editing : Bool) : String

Color for a Timer's current state (editing, expired, running, paused).

Source
tui_color(hex : String) : Tui::Color

Converts a palette hex color (e.g. RUNNING) to a Tui::Color, per mode.

Source

Nested types