Recent Changes - Search:

SourceForge.net Logo
mrxvt SourceForge project page

FAQ /

Colors

Taking full advantage of 256 colors in mrxvt

Setting the terminfo entries

Unfortunately, the default terminfo files distributed with most distributions are still ancient 8 color ones. Probably the first thing you should do is to regenerate the terminfo database to reflect that you have 256 colors. You use the mrxvt.terminfo file supplied with the mrxvt source. Do

    tic mrxvt.terminfo

and your terminfo should now reflect that your terminal has 256 colors. (Make sure that you run mrxvt with TERM=rxvt).

Vim

Vim can use 256 colors and give you an almost identical look in your console and GUI version of Vim. All you have to do is use a color scheme that takes advantage of the 256 color support. You can try xterm16, which was written (by me) with this in mind. (The documentation also has a few words on how to get 256 colors working properly in Vim).

Alternately, if you choose to define your own colors in Vim, do something like this:

    if &t_Co == 256
	hi <group> ctermfg=xxx ctermbg=yyy
	...
    else
	" define highlighting groups for non-256 color terminals
    endif

Here xxx and yyy are the color NUMBER respectively. The way 256 color terminals number colors is as follows:

  1. Colors 0 -- 15 are the primary colors.
  2. Colors 16 -- 231 form a 6x6x6 RGB cube.
  3. Colors 232 -- 255 form a greyscale ramp.

Mutt

Using 256 colors in mutt

Shell

dircolors, lscolors

Edit - History - Print - Recent Changes - Search
Page last modified on August 19, 2007, at 11:20 PM