Skip to content

Commit

Permalink
iii: revisit nick randomized coloring once more
Browse files Browse the repository at this point in the history
  • Loading branch information
c00kiemon5ter committed May 15, 2013
1 parent 966cc93 commit ab76b1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iii.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ do
tmpnick="${nick%[_12]}"
clrnick="$(printf '(%d ^ %d + %d + %d)' "${#tmpnick}" "'${tmpnick}" "'${tmpnick#?}" "'${tmpnick#??}")"

# avoid black(1), dark blue(4), yellow(11) and white(7, 13)
clrnick="$((clrnick % 12 + 1))"
case "$clrnick" in 4) clrnick=5 ;; 7) clrnick=6 ;; 11) clrnick=10 ;; esac
# avoid black(1,8), dark blue(4), bright yellow(11) and white(7, 15)
clrnick="$((clrnick % 10 + 1))"
case "$clrnick" in 4) clrnick=12 ;; 7) clrnick=13 ;; 8) clrnick=14 ;; esac

clrnick="$(tput setaf "$clrnick")"
clrsepr="$dark"
Expand Down

0 comments on commit ab76b1d

Please sign in to comment.