Caleb Taylor
1 min readJan 16, 2019

I’ll admit I’m a little fuzzy on the details here. I found this response in a github issue on neovim.

This is how it works: When a UI is attached, it passes a “rgb” boolean parameter that tells nvim which kind of color/attributes should be sent. gui* attributes will be sent if rgb is true, cterm* attributes will be used otherwise.

Color schemes can be written in the same way as for vim, the difference is that cterm* and gui* are not mutually exclusive. So the color scheme should not check for &term or has('gui_running') because nvim will select the right attributes for each connected UI.

I’m not quite sure what “UI” is in this context and in what cases the “rgb” param would be true or not. I use neovim inside of iterm inside of a tmux session, but I also have enabled true color support in all my tools.

I believe that code sample worked for me, but if it isn’t working for you, it could be because of some automated rgb detection. Please let me know if you find any more detailed info. Thanks!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Caleb Taylor
Caleb Taylor

Written by Caleb Taylor

Sr. Engineering Manager @ PlayStation

Responses (1)

Write a response