Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between cterm color and gui color?

I am customizing my own color scheme for Vim but I don't know when should I configure ctermfg/ctermbg variable and guifg/guibg variable because I didn't see any differences between them at all. Is there any difference between them?

Can any one give me an illustrative example of how to use them ? Thanks

like image 696
Trung anh nguyễn thành Avatar asked Mar 08 '20 17:03

Trung anh nguyễn thành


1 Answers

I didn't see any differences between them at all

ctermxx is used by console version of Vim (when set notermguicolors). guixx is used in GVim, or in console if set termguicolors, and the console is capable of TrueColor, obviously. Hence you must test it in different programs to see the difference.

Also, some colors could be the same or very close to each other, e.g. "blue" is "blue" both in GUI and console.

Can any one give me an illustrative example of how to use them?

hi Normal guifg=#1034a6 guibg=#f5f5dc ctermfg=19 ctermbg=230

Should look very similar but still a little different in GUI and console

For symbolic colors names see :h cterm-colors and $VIMRUNTIME/rgb.txt. The cheat sheet of 256 color indexes for console is available here.

like image 89
Matt Avatar answered Oct 02 '22 09:10

Matt