-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_colors
79 lines (66 loc) · 2.56 KB
/
.bash_colors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# ~/.bash_colors
# Author: Aamnah <hello@aamnah.com> @AamnahAkram
# Link: https://aamnah.com
# Version: 0.0.2
# lastmod: 2018-12-20
# for the sake of cleanliness, i have created a separate color codes file
# instead of adding everything to .bash_profile
# since this is a separate file, it needs to be sourced via .bash_profile
# just add it like you have added .aliases and .functions
# the fact that these color variables are going to be sourced from the .bash_profile means
# that all scripts will have access to these without having to add these inside every individual script
# this file is mostly for reference though, i hardly ever use it.
# i always end up adding color values to individual scripts because they're usually open source
# and not everyone is going to have a `.bash_colors` file
# '\033' instead of '\e' works as ESC sequence on macOS.
# adding a 0 before the actual color number, (e.g. `0;94m`) also resets any previous color values
# using the Light versions of colors as they are more readable (e.g. 91 instead of 31 for red)
# `5m` is the value for BLINK
# Reset
###################################
DEFAULT='\033[39m'
NORMAL='\033[0m'
RESETCOLOR='\033[0m'
# Regular Colors
###################################
BLACK='\033[0;30m' # BLACK
RED='\033[0;91m' # RED
GREEN='\033[0;92m' # GREEN
YELLOW='\033[0;93m' # YELLOW
BLUE='\033[0;94m' # BLUE
MAGENTA='\033[0;95m' # MAGENTA
CYAN='\033[0;96m' # CYAN
WHITE='\033[0;97m' # WHITE
# Bold
###################################
BBLACK='\033[1;30m' # BLACK
BRED='\033[1;31m' # RED
BGREEN='\033[1;32m' # GREEN
BYELLOW='\033[1;33m' # YELLOW
BBLUE='\033[1;34m' # BLUE
BMAGENTA='\033[1;35m' # MAGENTA
BCYAN='\033[1;36m' # CYAN
BWHITE='\033[1;37m' # WHITE
# Underline
###################################
UBLACK='\033[4;30m' # BLACK
URED='\033[4;31m' # RED
UGREEN='\033[4;32m' # GREEN
UYELLOW='\033[4;33m' # YELLOW
UBLUE='\033[4;34m' # BLUE
UMAGENTA='\033[4;35m' # MAGENTA
UCYAN='\033[4;36m' # CYAN
UWHITE='\033[4;37m' # WHITE
# Background
###################################
ONBLACK='\033[40m' # BLACK
ONRED='\033[41m' # RED
ONGREEN='\033[42m' # GREEN
ONYELLOW='\033[43m' # YELLOW
ONBLUE='\033[44m' # BLUE
ONMAGENTA='\033[45m' # MAGENTA
ONCYAN='\033[46m' # CYAN
ONWHITE='\033[47m' # WHITE
# LINKS
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt#List_of_colors_for_prompt_and_Bash
# https://misc.flogisoft.com/bash/tip_colors_and_formatting