:term usually looks ugly in most colorschemes I've tried. At least on Windows, with light themes, these colors do not work and end up in an unreadable shade of yellow against my light background.
I recently re-enabled papercolor-theme/PaperColor, and I noticed it changed the terminal colors. They terminal actually became readable. I dug into the code and found it (most likely) originates from
g:terminal_ansi_colors, which is defined in the theme. Most themes only do this for Neovim, which requires a different variant, but I digress.
The documentation (
:help g:terminal_ansi_colors) states:
*g:terminal_ansi_colors* In GUI mode or with 'termguicolors', the 16 ANSI colors used by default in new terminal windows may be configured using the variable `g:terminal_ansi_colors`, which should be a list of 16 color names or hexadecimal color codes, similar to those accepted by |highlight-guifg|. When not using GUI colors, the terminal window always uses the 16 ANSI colors of the underlying terminal. The |term_setansicolors()| function can be used to change the colors, and |term_getansicolors()| to get the currently used colors.
But say I wanted to make my own colorscheme (or just make a different colorscheme that doesn't add support for
g:terminal_ansi_colors readable) - how do I use it? Or to be more specific: how do each of the 16 values map to a color on the terminal, provided there is a system?