1

If I type :h gui-colors, a list of available color names pops up. Often times I just want to change the tone of a color. Assuming these are simple variables of some sort, can I redefine these somehow?

For example: let &red=&green

2

That is not easily possible. I think those colors mentioned there are predefined in the source.

Most other colors will be read from the distributed file RGB.txt in the runtime directory. This file come originally from the X11 source and determines the color definitions for various names. (See also here)

It is not advisable, to change those definitions in the source because this will most likely cause confusion when working on a different system. Instead, define your own color names like

:hi MyGreen ctermfg=88 ctermbg=0 guifg=red guibg=NONE

and then use the colorname MyGreen consistently where you need it.

  • Of course, the highlight groups are themselves just color definitions (I didn't know). I can define my own and symlink them. brilliant – klaus May 18 '18 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.