Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 29 lines (23 sloc) 0.76 kB
02bd8ab @doritostains Added scpectrum script for easy 256 color theaming
doritostains authored
1 #! /bin/zsh
2 # A script to make using 256 colors in zsh less painful.
3 # P.C. Shyamshankar <sykora@lucentbeing.com>
4 # Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
5
6 typeset -Ag FX FG BG
7
8 FX=(
e8ef165 @doritostains escape sequences so rprompt doesn't mess up
doritostains authored
9 reset "%{%}"
10 bold "%{%}" no-bold "%{%}"
11 italic "%{%}" no-italic "%{%}"
12 underline "%{%}" no-underline "%{%}"
13 blink "%{%}" no-blink "%{%}"
14 reverse "%{%}" no-reverse "%{%}"
02bd8ab @doritostains Added scpectrum script for easy 256 color theaming
doritostains authored
15 )
16
17 for color in {000..255}; do
e8ef165 @doritostains escape sequences so rprompt doesn't mess up
doritostains authored
18 FG[$color]="%{[38;5;${color}m%}"
19 BG[$color]="%{[48;5;${color}m%}"
02bd8ab @doritostains Added scpectrum script for easy 256 color theaming
doritostains authored
20 done
cbaa97d Add utility method to spectrum
Benjamin Boudreau authored
21
22 # Show all 256 colors with color number
23 function spectrum_ls() {
24 for code in {000..255}; do
25 print -P -- "$code: %F{$code}Test%f"
26 done
27 }
28
Something went wrong with that request. Please try again.