Is it possible to define a custom RGB colour for the background colour of VIM?
At the moment I use set background=dark
in my .vimrc
which assigns #5D5D5D
for the background colour. However, I would prefer to have #3F3F3F
for my background colour.
Normally your terminal will support only 256 colors, and they are numbered. If you want to use a particular color but don't know the number, the script gui2term.py will help you to find the most approximate one. Or you can just pick one from a table like this one.
If you are designing or modifying for your own color scheme for Vim, you can also use gui2term.py to translate those colors to the numbers.
Once you get the color number you'd like to use, you can edit your color scheme file. changing (or adding) the ctermbg
value for the Normal
and NonText
group may be enough. E.g.:
highlight Normal guifg=#e0e0e0 guibg=#242424 gui=NONE ctermfg=254 ctermbg=235 cterm=NONE
highlight NonText guifg=#99968b guibg=#242424 gui=NONE ctermfg=246 ctermbg=235 cterm=NONE
There is a nice HTML Vim color scheme editor. You can try this to figure out which part uses which group and if you like, edit the colors visually (and run gui2term.py
against the result file to make it support color terminals).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With