Permalink
Browse files

Add utility method to spectrum

  • Loading branch information...
1 parent 1eb52d4 commit cbaa97d8c38bf7bc1a92480ae83e323e1e0cac02 Benjamin Boudreau committed Jul 23, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/spectrum.zsh
View
8 lib/spectrum.zsh
@@ -18,3 +18,11 @@ for color in {000..255}; do
FG[$color]="%{[38;5;${color}m%}"
BG[$color]="%{[48;5;${color}m%}"
done
+
+# Show all 256 colors with color number
+function spectrum_ls() {
+ for code in {000..255}; do
+ print -P -- "$code: %F{$code}Test%f"
+ done
+}
+

0 comments on commit cbaa97d

Please sign in to comment.