This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Bebop/bebop/colors.py

30 lines
988 B
Python

import curses
from enum import IntEnum
class ColorPair(IntEnum):
NORMAL = 0
ERROR = 1
LINK = 2
LINK_ID = 3
TITLE_1 = 4
TITLE_2 = 5
TITLE_3 = 6
PREFORMATTED = 7
BLOCKQUOTE = 8
DEBUG = 99
def init_colors():
curses.use_default_colors()
curses.init_pair(ColorPair.NORMAL, curses.COLOR_WHITE, -1)
curses.init_pair(ColorPair.ERROR, curses.COLOR_RED, -1)
curses.init_pair(ColorPair.LINK, curses.COLOR_CYAN, -1)
curses.init_pair(ColorPair.LINK_ID, curses.COLOR_WHITE, -1)
curses.init_pair(ColorPair.TITLE_1, curses.COLOR_GREEN, -1)
curses.init_pair(ColorPair.TITLE_2, curses.COLOR_MAGENTA, -1)
curses.init_pair(ColorPair.TITLE_3, curses.COLOR_MAGENTA, -1)
curses.init_pair(ColorPair.PREFORMATTED, curses.COLOR_YELLOW, -1)
curses.init_pair(ColorPair.BLOCKQUOTE, curses.COLOR_CYAN, -1)
curses.init_pair(ColorPair.DEBUG, curses.COLOR_BLACK, curses.COLOR_GREEN)