Skip to main content

get_effective_color

Function get_effective_color 

fn get_effective_color(
    state: ClientState,
    highlighted: bool,
    original_console_color: Option<CONSOLE_CHARACTER_ATTRIBUTES>,
    disabled_console_color: CONSOLE_CHARACTER_ATTRIBUTES,
    highlighted_console_color: CONSOLE_CHARACTER_ATTRIBUTES,
) -> Option<CONSOLE_CHARACTER_ATTRIBUTES>
Expand description

Resolve the console color for a (state, highlighted) combination; highlight overlays the disabled color.

§Arguments

  • state - The client’s current ClientState.
  • highlighted - true while the client is the selected window in the daemon’s enable/disable submenu.
  • original_console_color - Console color captured at startup.
  • disabled_console_color - Color applied while the client is ClientState::Disabled.
  • highlighted_console_color - Color applied while the client is highlighted.

§Returns

The color to paint, or None when original_console_color is None.