I'm trying to make my own colorscheme in Vim, but are struggling to see the available colors in iTerm. Here are my iTerm-color-settings:
Here's how I can use it in Vim (for example using ctermfg=darkred
):
iTerm color Vim-color
----------------------------
Normal-red darkred
Bright-red red
Normal-blue blue
Bright-blue lightblue
So it appears to me, that Vim has both
'darkred' 'red' and 'lightred'
… But as you can see, then sometimes the 'Normal'-color is the Vim-dark-color, and sometimes the it's just the regular color. Is there a reason for that? And are there a system for it, or how does Vim know which color in iTerm to use?
I don't know, if it's of any help, but if I edit an .itermcolors-file, then the colors look like this:
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.30443088503649635</real>
<key>Green Component</key>
<real>0.18199703467153286</real>
<key>Red Component</key>
<real>0.83819000912408759</real>
</dict>
Best Answer
By writing
:help cterm-colors
in Vim, then I got the left side of the following table. By trial-and-error, I tried out different colors from iTerm and figured out the following (ready to be copied into a.vim
-colorscheme to help remember what is what:The colors with question-marks are unable to be changed (unless I'm blind or something).