Skip to content

Commit

Permalink
Added the spectrum_bls function, which prints all 256 colors set as the
Browse files Browse the repository at this point in the history
background.

We can easily see which color we want to set when changing the PS1 shell variable,
since the colors are more distinctive.
  • Loading branch information
dejan committed Oct 16, 2013
1 parent c79e5a9 commit f057737
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/spectrum.zsh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ function spectrum_ls() {
done done
} }


# Show all 256 colors where the background is set to specific color
function spectrum_bls() {
for code in {000..255}; do
((cc = code + 1))
print -P -- "$BG[$code]$code: Test %{$reset_color%}"
done
}

0 comments on commit f057737

Please sign in to comment.