nvim icon indicating copy to clipboard operation
nvim copied to clipboard

The default Catppuccin theme looks different between MacOS Terminal and iTerm2

Open fangying opened this issue 3 years ago • 1 comments

In MacOS iTerm2 the Catppuccin mocha theme looks right as below image However it looks strange in MacOS Terminal as below image It looks like there is a strange blue background color is set to Catppuccin which makes it really bad to work with. The only difference is the terminal software. I cannot figure it out why this is going to happen, like to get help with it because i really like to use the MacOS default terminal and want this nvim config can work it.

fangying avatar Jul 31 '22 02:07 fangying

Different terminals support different numbers of colors displayed. Many new colorscheme, such as Catppuccin need 256 color support, it looks like the macOS default terminal does not support it, at least not enabled by default.

ofseed avatar Jul 31 '22 03:07 ofseed

Different terminals support different numbers of colors displayed. Many new colorscheme, such as Catppuccin need 256 color support, it looks like the macOS default terminal does not support it, at least not enabled by default.

The default MacOS terminal.app does not enable 256 colors by default, however i have enabled the "xterm-256color" by setting it in terminal.app setting field, which is image

And also "export TERM=xterm-256color" is exported to system environment variable. But the terminal.app still looks quite strange if this nvim config is used.

fangying avatar Jul 31 '22 12:07 fangying

I almost got it wrong, Catppuccin needs 24-bit true color rather than 256-color. The format of 24-bit color is just like #FFFFFF, which you can see in the source code of Catppuccin and many neovim-only colorschemes.

The number of the 24-bit color is 4096, much more than 256. The default terminal of macOS doesn't support true color, and I even heard that it doesn't support 256-color perfectly.

To many traditional terminals, like macOS default, even if they supported true color, they usually have a slower speed. I recommend WezTerm, Alacritty, or Kitty instead, they all are modern terminals that support 24-colors and have a faster speed by using GPU acceleration.

ofseed avatar Jul 31 '22 14:07 ofseed

I almost got it wrong, Catppuccin needs 24-bit true color rather than 256-color. The format of 24-bit color is just like #FFFFFF, which you can see in the source code of Catppuccin and many neovim-only colorschemes.

The number of the 24-bit color is 4096, much more than 256. The default terminal of macOS doesn't support true color, and I even heard that it doesn't support 256-color perfectly.

To many traditional terminals, like macOS default, even if they supported true color, they usually have a slower speed. I recommend WezTerm, Alacritty, or Kitty instead, they all are modern terminals that support 24-colors and have a faster speed by using GPU acceleration.

Thanks. Now it is figured out. Maybe it's time for me to switch from the MacOS default terminal which does not support true color to some modern terminal apps as suggested here.

fangying avatar Jul 31 '22 15:07 fangying