about summary refs log tree commit diff
path: root/Functions/Misc/colors
blob: 464260db08007997338f5117d990cf4420ad2f9e (plain) (blame)
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
80
81
82
83
84
85
# Put standard ANSI color codes in environment for easy use
reset_color=$'\e[0m'
bold_color=$'\e[1m'

# Foreground

typeset -Ag fg
fg=(
  grey      $'\e[30m'
  red       $'\e[31m'
  green     $'\e[32m'
  yellow    $'\e[33m'
  blue      $'\e[34m'
  magenta   $'\e[35m'
  cyan      $'\e[36m'
  white     $'\e[37m'
)
fg_zzzz="$reset_color"

typeset -Ag fg_no_bold
fg_no_bold=(
  grey      $'\e[0;30m'
  red       $'\e[0;31m'
  green     $'\e[0;32m'
  yellow    $'\e[0;33m'
  blue      $'\e[0;34m'
  magenta   $'\e[0;35m'
  cyan      $'\e[0;36m'
  white     $'\e[0;37m'
)
fg_no_bold_zzzz="$reset_color"

typeset -Ag fg_bold
fg_bold=(
  grey      $'\e[1;30m'
  red       $'\e[1;31m'
  green     $'\e[1;32m'
  yellow    $'\e[1;33m'
  blue      $'\e[1;34m'
  magenta   $'\e[1;35m'
  cyan      $'\e[1;36m'
  white     $'\e[1;37m'
)
fg_bold_zzzz="$reset_color"

# Background

typeset -Ag bg
bg=(
  grey      $'\e[40m'
  red       $'\e[41m'
  green     $'\e[42m'
  yellow    $'\e[43m'
  blue      $'\e[44m'
  magenta   $'\e[45m'
  cyan      $'\e[46m'
  white     $'\e[47m'
)
bg_zzzz="$reset_color"

typeset -Ag bg_no_bold
bg_no_bold=(
  grey      $'\e[0;40m'
  red       $'\e[0;41m'
  green     $'\e[0;42m'
  yellow    $'\e[0;43m'
  blue      $'\e[0;44m'
  magenta   $'\e[0;45m'
  cyan      $'\e[0;46m'
  white     $'\e[0;47m'
)
bg_no_bold_zzzz="$reset_color"

typeset -Ag bg_bold
bg_bold=(
  grey      $'\e[1;40m'
  red       $'\e[1;41m'
  green     $'\e[1;42m'
  yellow    $'\e[1;43m'
  blue      $'\e[1;44m'
  magenta   $'\e[1;45m'
  cyan      $'\e[1;46m'
  white     $'\e[1;47m'
)
bg_bold_zzzz="$reset_color"