Neovim plugin for building Tinted Theming colorschemes with support for Neovim's builtin LSP and Treesitter.
For smoothest usage, we recommend using Tinty in conjunction with
tinted-nvim.
Have a look at Tinted Gallery for a preview of our themes.
-- Enable true color support (recommended)
vim.opt.termguicolors = true
-- Load the colorscheme
require('tinted-colorscheme').setup('base16-ayu-dark')
-- Or use any available theme via `:colorscheme`
vim.cmd.colorscheme('base16-ayu-dark')To get the most accurate colors and full Base24 support, enable true color in your Neovim config:
vim.opt.termguicolors = truereturn {
"tinted-theming/tinted-nvim",
}use {
'tinted-theming/tinted-nvim',
}Plug 'tinted-theming/tinted-nvim'-- All builtin colorschemes can be accessed with |:colorscheme|.
vim.cmd.colorscheme('base16-ayu-dark')The require('tinted-colorscheme').setup() function can be called with two
optional arguments: a theme or a config table.
| Type | Description |
|---|---|
string |
Name of a registered theme (e.g. "base16-ayu-dark") |
table |
A custom Base16/Base24 color table with keys from base00 to base17 |
undefined |
If omitted, will try to detect a theme from Tinty, or fall back to "tinted-nvim-default" (base16-ayu-dark) |
Examples:
string:require('tinted-colorscheme').setup('base16-ayu-dark')table:require('tinted-colorscheme').setup({ base00 = "#0f1419", base01 = "#131721", base02 = "#272d38", base03 = "#3e4b59", base04 = "#bfbdb6", base05 = "#e6e1cf", base06 = "#e6e1cf", base07 = "#f3f4f5", base08 = "#f07178", base09 = "#ff8f40", base0A = "#ffb454", base0B = "#b8cc52", base0C = "#95e6cb", base0D = "#59c2ff", base0E = "#d2a6ff", base0F = "#e6b673", })
undefined:require('tinted-colorscheme').setup()
| Key | Type | Description |
|---|---|---|
supports |
table |
Controls external sources for color selection |
highlights |
table |
Enables or disables plugin integrations and highlight groups (Enabled by default) |
| Key | Default | Description |
|---|---|---|
tinty |
true |
If true, attempts to use current Tinty theme if available |
tinted_shell |
false |
If true, allows detection from BASE16_THEME env var (only outside tmux) |
live_reload |
true |
If true, open Neovim instances live reloads whenever Tinty applies a theme system-wide |
| Key | Default | Description |
|---|---|---|
telescope |
true |
Enables Telescope highlight groups |
telescope_borders |
false |
Enables borders in Telescope |
indentblankline |
true |
Enables indent-blankline.nvim highlight groups |
notify |
true |
Enables nvim-notify highlights |
ts_rainbow |
true |
Enables rainbow brackets via Treesitter |
cmp |
true |
Enables nvim-cmp highlight groups |
illuminate |
true |
Enables vim-illuminate highlights |
lsp_semantic |
true |
Enables semantic token highlights from LSP |
mini_completion |
true |
Enables highlights for mini.completion |
dapui |
true |
Enables highlights for nvim-dap-ui |
Example:
require("tinted-colorscheme").setup("base16-ayu-dark", {
supports = {
tinty = true,
tinted_shell = false,
},
highlights = {
telescope = true,
telescope_borders = false,
indentblankline = true,
notify = true,
cmp = true,
ts_rainbow = true,
illuminate = true,
lsp_semantic = true,
mini_completion = true,
dapui = true,
}
})You can access the Base16 and Base24 colors after setting the colorscheme by
name (base01, base02, ..., base17)
local red = require('tinted-colorscheme').colors.base08.setup() will use the current Tinty theme, which is retrieved from
tinty current. If Tinty is not installed or tinty current does not return a
value, "tinted-nvim-default" (base16-ayu-dark) will be used as a fallback
theme.
To have tinted-nvim automatically update the theme when tinty apply ayu-dark is run, you can enable
the live-reload feature.
local tinted = require('tinted-colorscheme')
tinted.setup(nil, {
supports = {
live_reload = true
}
})Note
If you don't see colours, try adding vim.opt.termguicolors = true to
your init.lua
Have a look at Tinted Gallery for a preview of our themes.
-- To disable highlights for supported plugin(s), call the `with_config` function **before** setting the colorscheme.
-- These are the defaults.
require('tinted-colorscheme').with_config({
supports = {
tinty = true,
tinted_shell = false,
live_reload = true,
},
highlights = {
telescope = true,
indentblankline = true,
notify = true,
ts_rainbow = true,
cmp = true,
illuminate = true,
dapui = true,
}
})If you have both tinty and live_reload enabled, the colorscheme will automatically update whenever you change
your theme system-wide with tinty apply <SCHEME>.
The user event TintedColorsPost is triggered whenever the colorscheme changes. This is useful for when you want to
do something whenever the colorscheme live-reloads for example, such as applying some highlights yourself. You're able
to access the color-table from the tinted-colorscheme module:
vim.api.nvim_create_autocmd("User", {
pattern = "TintedColorsPost",
callback = function()
-- Do things whenever the theme changes.
local colors = require("tinted-colorscheme").colors
-- e.g. colors.base00, colors.base01, ... colors.base0F
end,
})You can use any of the following schemes with :colorscheme (for example
:colorscheme base16-ayu-dark):
base16-voltrixThis repository is forked from base16-nvim, special thanks to all the contributors for work they've done.