================ Colors Utilities ================ .. default-domain:: bash .. file:: colors.bsh Collection of named colors and color functions By sourcing this file and running color_setup, all the basic colors and styles are made available in a terminal. Additional functions such as FG and BG give access to arbitrary colors by index. Some terminals support up to 256 colors, as :func:`number_colors` indicates. .. seealso:: :func:`color_setup` :func:`FG` :func:`BG` :func:`number_colors` .. rubric:: Bugs Having variables with color codes in them can make looking at "set", "declare/typeset", or "bash -xv" very noisy, as colors aren't cleared from line to line in bash .. note:: Per git-sh-prompt/git-prompt.sh: If setting ``PS1`` or ``PROMPT_COMMAND`` you must add \[ and \] around colors to prevent issues with command line editing/browsing/completion! .. var:: CSI The Control Sequence Introducer, ``$'\x1b['`` aka ``$'\e['`` .. function:: color_setup Set up variables and functions for colors and styles Sets the values for the 8 basic colors (BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, and WHITE), and styles (BOLD, DIM, ITALIC, UNDERLINE, BLINK, OVERLINE, HIDDEN and STRIKETHROUGH) and RESET, RESET_