Skip to content

Commit c4634bc

Browse files
committed
adjust color order
1 parent 08f4d47 commit c4634bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

a2l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ colorEcho() {
2222
[ -t 1 ] && echo "$ec[1;${color}m$@$eend" || echo "$@"
2323
}
2424

25-
readonly -a ECHO_COLORS=(37 31 32 34 33 35 56)
25+
readonly -a ECHO_COLORS=(31 32 37 34 33 35 36)
2626
COUNT=0
2727

2828
for a; do

colines

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
readonly ec=$'\033' # escape char
1515
readonly eend=$'\033[0m' # escape end
1616

17-
readonly -a ECHO_COLORS=(37 31 32 34 33 35 56)
17+
readonly -a ECHO_COLORS=(31 32 37 34 33 35 36)
1818
COUNT=0
1919
colorEcho() {
20-
local color="${ECHO_COLORS[$((COUNT++ % ${#ECHO_COLORS[@]} + 1))]}"
20+
local color="${ECHO_COLORS[$((COUNT++ % ${#ECHO_COLORS[@]}))]}"
2121
# check isatty in bash https://stackoverflow.com/questions/10022323
2222
# if stdout is console, turn on color output.
2323
[ -t 1 ] && echo "$ec[1;${color}m$@$eend" || echo "$@"

0 commit comments

Comments
 (0)