TransWikia.com

Why does peachpuff colorscheme looks completely different in terminal and GUI (MacVim)?

Vi and Vim Asked on August 31, 2021

I’ve installed MacVim using Brew: brew cask install neovim

I’m using the macOS’s Terminal.app to run MacVim in Terminal mode.

I’ve experimented with :colorscheme peachpuff, since many recommends that color scheme, which comes with MacVim by default.

In the picture below shows how peachbuff looks, when running using mvim in Terminal mode (left) and GUI mode (right).

Why does the peachbuff color scheme looks so different in the two modes? Not even the background colors are identical.

I’m aware that GUI mode probably has full "truecolor" support, while the Terminal mode uses 256-colors. Is that the reason?

if has('gui_running')
   set background=light
   colorscheme macvim
else
"   set termguicolors
   set t_Co=256
   set background=light
   colorscheme peachpuff
endif

enter image description here

2 Answers

So "peachpuff" has just the white background in console. You can patch the source directly, or add this to your vimrc:

augroup peachpuff | au!
    autocmd colorscheme peachpuff hi Normal ctermfg=0 ctermbg=223
augroup end

Still not exactly the same as in GUI, but it's much closer now.

P.S. Or you can "extend" an existing color scheme using the following template:

~/.vim/colors/peachpuff.vim

" read in the standard colorscheme
source $VIMRUNTIME/colors/<sfile>:t

" apply our fix
hi Normal ctermfg=0 ctermbg=223

Answered by Matt on August 31, 2021

In the code of peachpuff colorscheme we can find such note:

" Note: Only GUI colors differ from default, on terminal it's just `light'.

Answered by Jorengarenar on August 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP