Module: Fatty::Colors::Pairs

Defined in:
lib/fatty/colors/pairs.rb

Overview

Stable Curses color-pair IDs. These are intentionally constant so the renderer can refer to them without dynamic allocation.

Pair 0 is reserved in ncurses; start at 1.

Constant Summary collapse

OUTPUT =
1
INPUT =
2
INPUT_SUGGESTION =
3
CURSOR =
4
REGION =
5
STATUS_INFO =
6
STATUS_WARN =
7
STATUS_ERROR =
8
STATUS_GOOD =
9
STATUS =
10
ALERT_INFO =
11
ALERT_WARN =
12
ALERT_ERROR =
13
ALERT_GOOD =
14
ALERT =
15
SEARCH =
20
SEARCH_HIGHLIGHT =
21
SEARCH_HIGHLIGHT_SECONDARY =
22
PAGER_STATUS =
23
30
31
32
33
34
ROLE_TO_PAIR =

Role -> pair id mapping for iteration.

{
  output: OUTPUT,
  input: INPUT,
  input_suggestion: INPUT_SUGGESTION,
  cursor: CURSOR,
  region: REGION,

  good: STATUS_GOOD,
  info: STATUS_INFO,
  warn: STATUS_WARN,
  error: STATUS_ERROR,
  status: STATUS,

  alert_info: ALERT_INFO,
  alert_warn: ALERT_WARN,
  alert_error: ALERT_ERROR,
  alert_good: ALERT_GOOD,
  alert: ALERT,

  match_current: SEARCH_HIGHLIGHT,
  match_other: SEARCH_HIGHLIGHT_SECONDARY,
  search_input: SEARCH,

  pager_status: PAGER_STATUS,

  popup: POPUP,
  popup_selection: POPUP_SELECTION,
  popup_input: POPUP_INPUT,
  popup_frame: POPUP_FRAME,
  popup_counts: POPUP_COUNTS,
}.freeze