Home Explore Blog CI



neovim

1st chunk of `runtime/doc/dev_theme.txt`
43d6051ec600bdc38c1dbbe61e9c6415939d8ca72313733b00000001000008f6
*dev_theme.txt*          Nvim


                            NVIM REFERENCE MANUAL


Nvim colorscheme guidelines                                   *dev-theme*

Style guidelines for developing Nvim's default colorscheme.

License: CC-By 3.0 https://creativecommons.org/licenses/by/3.0/

                                      Type |gO| to see the table of contents.

==============================================================================
Design

- Be "Neovim branded", i.e. have mostly "green-blue" feel plus one or two
  colors reserved for very occasional user attention.
- Be oriented for 'termguicolors' (true colors) while being extra minimal for
  'notermguicolors' (16 colors) as fallback.
- Be accessible, i.e. have high enough contrast ratio (as defined in
  https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).
  This means to have value at least 7 for |hl-Normal| and 4.5 for some common
  cases (|hl-Visual|, `Comment` with set 'cursorline', colored syntax, `Diff*`,
  |hl-Search|).
- Be suitable for dark and light backgrounds via exchange of dark and light
  palettes.
- Be usable, i.e. provide enough visual feedback for common objects.


==============================================================================
Palettes

- There are two separate palettes: dark and light. They all contain the same
  set of colors exported as `NvimDark*` and `NvimLight*` colors respectively.
- The dark palette is used for background in the dark color scheme and for
  foreground in the light color scheme; and vice versa. This introduces
  recognizable visual system without too standing out.
- Actual computation of palettes should be done in a perceptually uniform
  color space. Oklch is a good choice.
- Each palette has the following colors (descriptions are for dark background;
  reverse for light one):
    - Four shades of colored "cold" greys for general UI.
        - Dark ones (from darkest to lightest) are reserved as background for
          |hl-NormalFloat| (considered as "black"), |hl-Normal| (background),
          |hl-CursorLine|, |hl-Visual|.
        - Light ones (also from darkest to lightest) are reserved for
          `Comment`, |hl-StatusLine|/|hl-TabLine|, |hl-Normal| (foreground),
          and color considered as "white".
- Six colors

Title: Nvim Colorscheme Guidelines
Summary
This document outlines the style guidelines for developing Nvim's default colorscheme. It covers design principles such as adhering to a "Neovim branded" color scheme, optimizing for 'termguicolors' while providing a fallback for 'notermguicolors', ensuring accessibility through sufficient contrast ratios, supporting both dark and light backgrounds, and providing adequate visual feedback. It also details the use of two separate color palettes (dark and light) with specific colors for various UI elements.