Nightvision uses only green. Not only is green pleasant to look at, but the human eye percieves more shades of green than any other color, making it an obvious choice for use with a text editor or IDE.
- Light and dark mode
- Soft, medium, and hard contrast
- Nine-color, all-green palette
- pure, gray, jade, lime, pear, drab, aqua, sage, and teal
- Background and foreground can be changed to any in the palette
- Palette is generated, ensuring colors are correct
- Fully written in Lua
Soft contrast with sage for dark mode and jade for light mode.
Medium contrast with pure for dark mode and pure for light mode. This is the default.
Hard contrast with gray for dark mode and drab for light mode.
The background color in dark mode can be set by specifying a color,
" If you use init.vim
let g:nv_dark = 'jade'
-- If you use init.lua
vim.g.nv_dark = 'jade'
or, for light mode,
" If you use init.vim
let g:nv_light = 'sage'
-- If you use init.lua
vim.g.nv_light = 'sage'
Contrast changes the brightness of the background, the brightness of text, and the difference in brightness between syntax (for instance, comments are darker than other syntax highlights in dark mode, or brighter in light mode). Set contrast by specifying one of the three options,
" If you use init.vim
let g:nv_contrast = 'soft'
-- If you use init.lua
vim.g.nv_contrast = 'soft
Run :echo g:nv_colors
to view the hex values of the current nightvision configuration.
Nightvision can be installed with any of the usual package managers.
Add
use 'mathofprimes/nightvision-nvim'
to you're init.lua file and run :PackerInstall
.