miikanissi
modus-themes.nvim
Lua

Highly accessible themes for Neovim, conforming with the highest standard for color contrast between background and foreground values (WCAG AAA). A Neovim port of the original Modus Themes built for GNU Emacs.

Last updated Jul 7, 2026
442
Stars
35
Forks
4
Issues
0
Stars/day
Attention Score
81
Language breakdown
Lua 95.7%
Shell 2.4%
JavaScript 1.9%
โ–ธ Files click to expand
README

Modus Themes

GitHub Release CI License WCAG AAA

Highly accessible themes for Neovim, conforming with the highest standard for color contrast between background and foreground values (WCAG AAA). This is a Neovim port of the original Modus Themes built for GNU Emacs.

Modus Themes Preview

Overview

The Modus Themes are designed for accessible readability. They conform with the highest standard for color contrast between background and foreground values. For small sized text, this corresponds to the WCAG AAA standard, which specifies a minimum contrast ratio of at least 7:1, while large sized and bold text have a contrast ratio of at least 4.5:1. Incidental text that is part of an inactive user interface component, or that are for pure decoration, have no contrast requirement.

This is a Neovim port of the original Modus Themes for GNU Emacs, and follows the design philosophy. It is not intended to be an exact 1:1 correspondence with GNU Emacs, but rather follows the spirit of the design and ensures conformity to the WCAG AAA guidelines.

This project is hosted on GitHub. Any issues and contributions should be directed there.

Features

  • Highly accessible โ€” prioritizes color contrast and contains tinted, deuteranopia, and
tritanopia theme variants
  • Extensive TreeSitter syntax highlighting and LSP integration
  • Supports most popular Neovim plugins
  • Switch between light (modusoperandi) and dark (modusvivendi) mode automatically
based on the background value set with vim.o.background
  • Provides extras to use Modus Themes with numerous other applications

Requirements

0.8.0

Installation

Install the theme with your preferred package manager.

lazy.nvim

{ "miikanissi/modus-themes.nvim", priority = 1000 }

packer.nvim

use({ "miikanissi/modus-themes.nvim" })

vim-plug

Plug 'miikanissi/modus-themes.nvim'

Usage

Lua

vim.cmd([[colorscheme modus]]) -- modusoperandi, modusvivendi

Vim Script

colorscheme modus " modusoperandi, modusvivendi

Configuration

Ensure the configuration is set BEFORE loading the color scheme with
colorscheme modus.

By default, the theme will choose between light (modus_operandi) and dark (modus_vivendi) based on the background value set with vim.o.background.

If using the default options, there is no need to explicitly call setup.

-- Default options
require("modus-themes").setup({
	-- Theme comes in two styles modusoperandi and modusvivendi
	-- auto will automatically set style based on background set with vim.o.background
	style = "auto",

variant = "default", -- DEPRECATED: Use variants instead -- Theme comes in four variants default, tinted, deuteranopia, and tritanopia variants = { modusoperandi = "default", -- Set variant for modusoperandi style modusvivendi = "default", -- Set variant for modusvivendi style }, transparent = false, -- Transparent background (as supported by the terminal) dim_inactive = false, -- "non-current" windows are dimmed hideinactivestatusline = false, -- Hide statuslines on inactive windows. Works with the standard StatusLine, LuaLine and mini.statusline linenrcolumn_background = true, -- Distinct background colors in line number column. false will disable background color and fallback to Normal background signcolumnbackground = true, -- Distinct background colors in sign column. false will disable background color and fallback to Normal background styles = { -- Style to be applied to different syntax groups -- Value is any valid attr-list value for :help nvimsethl comments = { italic = true }, keywords = { italic = true }, functions = {}, variables = {}, },

--- You can override specific color groups to use other groups or a hex color --- Function will be called with a ColorScheme table --- Refer to extras/lua/modusoperandi.lua or extras/lua/modusvivendi.lua for the ColorScheme table ---@param colors ColorScheme on_colors = function(colors) end,

--- You can override specific highlights to use other groups or a hex color --- Function will be called with a Highlights and ColorScheme table --- Refer to extras/lua/modusoperandi.lua or extras/lua/modusvivendi.lua for the Highlights and ColorScheme table ---@param highlights Highlights ---@param colors ColorScheme on_highlights = function(highlights, colors) end, })

Example Settings with Color and Highlight Overrides

require("modus-themes").setup({
	style = "modusoperandi", -- Always use modusoperandi regardless of vim.o.background
	variants = {
		modusoperandi = "deuteranopia", -- Use deuteranopia variant for modusoperandi
		modusvivendi = "tinted", -- Use tinted variant for modusvivendi
	},
	styles = {
		functions = { italic = true }, -- Enable italics for functions
	},

on_colors = function(colors) colors.error = colors.red_faint -- Change error color to the "faint" variant end, on_highlights = function(highlight, color) highlight.Boolean = { fg = color.green } -- Change Boolean highlight to use the green color end, })

Extras

Contributing

Contributions are welcome. Feel free to create a pull request on GitHub to add support for any missing plugins, or report an issue.

Please ensure the WCAG AAA contrast requirements are met. You can use this contrast checker for reference.

Extras are generated using a template system.

How to create a new extra template:

  • Create a file such as lua/modus-themes/extras/extra-app.lua.
  • Add the name and output file extension to the extras table in
lua/modus-themes/extras/init.lua.
  • Run the following command to generate new extras from the Modus Themes
plugin directory:
./scripts/extras.sh
  • Ensure the newly created themes in the extras/ directory are correct. Please **DO
NOT** commit them, as they are already automatically built by the CI.

Acknowledgements

GNU Emacs inspiration and as a base project template
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท miikanissi/modus-themes.nvim ยท Updated daily from GitHub