nvim
nvim copied to clipboard
The default Catppuccin theme looks different between MacOS Terminal and iTerm2
In MacOS iTerm2 the Catppuccin mocha theme looks right as below
However it looks strange in MacOS Terminal as below
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.
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.
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

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.
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.
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.