1" 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 14" Add | in original color pair to see white background. 15let s .= "\033[m|" 16call setline(2, s) 17 18" 6 x 6 x 6 color cube 19call setline(3, 'color cube') 20for high in range(0, 5) 21 let s = '' 22 for low in range(0, 35) 23 let nr = low + high * 36 24 let s .= "\033[48;5;" . (nr + 16) . "m " 25 endfor 26 let s .= "\033[m|" 27 call setline(high + 4, s) 28endfor 29 30" 24 shades of grey 31call setline(10, 'grey ramp') 32let s = '' 33for nr in range(0, 23) 34 let s .= "\033[48;5;" . (nr + 232) . "m " 35endfor 36let s .= "\033[m|" 37call setline(11, s) 38 39set binary 40write! <sfile>:h/color_ramp.txt 41quit 42