Browse code

Added scpectrum script for easy 256 color theaming

canthiswait authored on 26/04/2010 at 23:02:19
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+#! /bin/zsh
1
+# A script to make using 256 colors in zsh less painful.
2
+# P.C. Shyamshankar <sykora@lucentbeing.com>
3
+# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
4
+
5
+typeset -Ag FX FG BG
6
+
7
+FX=(
8
+    reset     ""
9
+    bold      "" no-bold      ""
10
+    italic    "" no-italic    ""
11
+    underline "" no-underline ""
12
+    blink     "" no-blink     ""
13
+    reverse   "" no-reverse   ""
14
+)
15
+
16
+for color in {000..255}; do
17
+    FG[$color]="[38;5;${color}m"
18
+    BG[$color]="[48;5;${color}m"
19
+done