You are not logged in.

#1 2010-07-22 12:06:46

thms
Member
Registered: 2010-02-01
Posts: 120

[solved] List of cterm colors?

Hi,

I'm a bit confused. I'd like to change a vim color scheme but I have no clue what colors the numbers (e.g. ctermbg=236) stand for (only for 16 colors).

I also tried this but it complains about missing rgb.txt (I have vim 7.2).

Anyone has a list of all 256 colors?

Last edited by thms (2010-07-22 12:35:41)

Offline

#2 2010-07-22 12:21:14

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [solved] List of cterm colors?

There is a Vim Wiki tip here: Xterm256 color names for console Vim


To know or not to know ...
... the questions remain forever.

Offline

#3 2010-07-22 12:25:04

Square
Member
Registered: 2008-06-11
Posts: 435

Re: [solved] List of cterm colors?

This page has a nice little block of the 256 color palette with tooltips showing the number when you place your mouse over a color. smile

Last edited by Square (2010-07-22 12:25:29)


 

Offline

#4 2010-07-22 12:35:23

thms
Member
Registered: 2010-02-01
Posts: 120

Re: [solved] List of cterm colors?

Thanks guys!

Offline

#5 2010-07-22 12:50:15

Square
Member
Registered: 2008-06-11
Posts: 435

Re: [solved] List of cterm colors?

Took a minute to write this for you (as well as myself).

#!/usr/bin/env python

fg = '\033[38;5;'
bg = '\033[48;5;'

for i in range( 0, 256):
  n = str(i)
  fgstr = fg + n + 'm' + n
  bgstr = bg + n + 'm' 'XXXXX'
  print fgstr, bgstr, '\033[0m'

Last edited by Square (2010-07-22 14:21:06)


 

Offline

#6 2010-07-22 19:36:12

thms
Member
Registered: 2010-02-01
Posts: 120

Re: [solved] List of cterm colors?

Great one...thx again!

Offline

Board footer

Powered by FluxBB