-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
color.sh
134 lines (116 loc) · 5.42 KB
/
color.sh
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/usr/bin/env bash
# ==============================================================================
# Home Assistant Community Add-ons: Bashio
# Bashio is a bash function library for use with Home Assistant add-ons.
#
# It contains a set of commonly used operations and can be used
# to be included in add-on scripts to reduce code duplication across add-ons.
# ==============================================================================
# ------------------------------------------------------------------------------
# Reset color output (background and foreground colors).
# ------------------------------------------------------------------------------
function bashio::color.reset() {
echo -n -e "${__BASHIO_COLORS_RESET}"
}
# ------------------------------------------------------------------------------
# Set default output color.
# ------------------------------------------------------------------------------
function bashio::color.default() {
echo -n -e "${__BASHIO_COLORS_DEFAULT}"
}
# ------------------------------------------------------------------------------
# Set font output color to black.
# ------------------------------------------------------------------------------
function bashio::color.black() {
echo -n -e "${__BASHIO_COLORS_BLACK}"
}
# ------------------------------------------------------------------------------
# Set font output color to red.
# ------------------------------------------------------------------------------
function bashio::color.red() {
echo -n -e "${__BASHIO_COLORS_RED}"
}
# ------------------------------------------------------------------------------
# Set font output color to green.
# ------------------------------------------------------------------------------
function bashio::color.green() {
echo -n -e "${__BASHIO_COLORS_GREEN}"
}
# ------------------------------------------------------------------------------
# Set font output color to yellow.
# ------------------------------------------------------------------------------
function bashio::color.yellow() {
echo -n -e "${__BASHIO_COLORS_YELLOW}"
}
# ------------------------------------------------------------------------------
# Set font output color to blue.
# ------------------------------------------------------------------------------
function bashio::color.blue() {
echo -n -e "${__BASHIO_COLORS_BLUE}"
}
# ------------------------------------------------------------------------------
# Set font output color to magenta.
# ------------------------------------------------------------------------------
function bashio::color.magenta() {
echo -n -e "${__BASHIO_COLORS_MAGENTA}"
}
# ------------------------------------------------------------------------------
# Set font output color to cyan.
# ------------------------------------------------------------------------------
function bashio::color.cyan() {
echo -n -e "${__BASHIO_COLORS_CYAN}"
}
# ------------------------------------------------------------------------------
# Set font output color background to default.
# ------------------------------------------------------------------------------
function bashio::color.bg.default() {
echo -n -e "${__BASHIO_COLORS_BG_DEFAULT}"
}
# ------------------------------------------------------------------------------
# Set font output color background to black.
# ------------------------------------------------------------------------------
function bashio::color.bg.black() {
echo -n -e "${__BASHIO_COLORS_BG_BLACK}"
}
# ------------------------------------------------------------------------------
# Set font output color background to red.
# ------------------------------------------------------------------------------
function bashio::color.bg.red() {
echo -n -e "${__BASHIO_COLORS_BG_RED}"
}
# ------------------------------------------------------------------------------
# Set font output color background to green.
# ------------------------------------------------------------------------------
function bashio::color.bg.green() {
echo -n -e "${__BASHIO_COLORS_BG_GREEN}"
}
# ------------------------------------------------------------------------------
# Set font output color background to yellow.
# ------------------------------------------------------------------------------
function bashio::color.bg.yellow() {
echo -n -e "${__BASHIO_COLORS_BG_YELLOW}"
}
# ------------------------------------------------------------------------------
# Set font output color background to blue.
# ------------------------------------------------------------------------------
function bashio::color.bg.blue() {
echo -n -e "${__BASHIO_COLORS_BG_BLUE}"
}
# ------------------------------------------------------------------------------
# Set font output color background to magenta.
# ------------------------------------------------------------------------------
function bashio::color.bg.magenta() {
echo -n -e "${__BASHIO_COLORS_BG_MAGENTA}"
}
# ------------------------------------------------------------------------------
# Set font output color background to cyan.
# ------------------------------------------------------------------------------
function bashio::color.bg.cyan() {
echo -n -e "${__BASHIO_COLORS_BG_CYAN}"
}
# ------------------------------------------------------------------------------
# Set font output color background to white.
# ------------------------------------------------------------------------------
function bashio::color.bg.white() {
echo -n -e "${__BASHIO_COLORS_BG_WHITE}"
}