blob: 3c8388262a62da27a62d5dcacd48d65944a8e4d9 [file] [log] [blame]
Bram Moolenaara8fc0d32017-09-26 13:59:47 +02001" Script to generate a file that shows al 256 xterm colors
2
3new
4call setline(1, 'ANSI')
5
6" ANSI colors
7let s = ''
8for nr in range(0, 7)
9 let s .= "\033[4" . nr . "m "
10endfor
11for nr in range(8, 15)
12 let s .= "\033[10" . (nr - 8) . "m "
13endfor
14let s .= "\033[107m|"
15call setline(2, s)
16
17" 6 x 6 x 6 color cube
18call setline(3, 'color cube')
19for high in range(0, 5)
20 let s = ''
21 for low in range(0, 35)
22 let nr = low + high * 36
23 let s .= "\033[48;5;" . (nr + 16) . "m "
24 endfor
25 let s .= "\033[107m|"
26 call setline(high + 4, s)
27endfor
28
29" 24 shades of grey
30call setline(10, 'grey ramp')
31let s = ''
32for nr in range(0, 23)
33 let s .= "\033[48;5;" . (nr + 232) . "m "
34endfor
35let s .= "\033[107m|"
36call setline(11, s)
37
38set binary
39write! <sfile>:h/xterm_ramp.txt
40quit