NvChad's base46 theme plugin with caching ( Total re-write )
Lua
307
615 commits
updated Sep 25, 2026
This is supposed to be use with NvChad's UI plugin.
Check its install doc
and then read :h nvui.base46
:hi command will list all highlight groups:hi with args will highlight a highlight grouphi Comment guifg=#ffffff gui=italic, bold:h nvim_set_hl for detailed docvim.api.nvim_set_hl(0, "Comment", {
fg = "#ffffff",
italic = true,
bold = true,
})
There are 2 main tables used for base46
base_30 is used for general UIbase_16 is used for syntax highlightingNote: the below values are mostly approx values so its not compulsory that you have to use those exact numbers, test your theme i.e show it in the PR to get feedback from @siduck
-- this line for types, by hovering and autocompletion (lsp required)
-- will help you understanding properties, fields, and what highlightings the color used for
---@type Base46Table
local M = {}
-- UI
M.base_30 = {
white = "",
black = "", -- usually your theme bg
darker_black = "", -- 6% darker than black
black2 = "", -- 6% lighter than black
one_bg = "", -- 10% lighter than black
one_bg2 = "", -- 6% lighter than one_bg
one_bg3 = "", -- 6% lighter than one_bg2
grey = "", -- 40% lighter than black (the % here depends so choose the perfect grey!)
grey_fg = "", -- 10% lighter than grey
grey_fg2 = "", -- 5% lighter than grey
light_grey = "",
red = "",
baby_pink = "",
pink = "",
line = "", -- 15% lighter than black
green = "",
vibrant_green = "",
nord_blue = "",
blue = "",
seablue = "",
yellow = "", -- 8% lighter than yellow
sun = "",
purple = "",
dark_purple = "",
teal = "",
orange = "",
cyan = "",
statusline_bg = "",
lightbg = "",
pmenu_bg = "",
folder_bg = ""
}
-- check https://github.com/chriskempson/base16/blob/master/styling.md for more info
M.base_16 = {
base00 = "",
base01 = "",
base02 = "",
base03 = "",
base04 = "",
base05 = "",
base06 = "",
base07 = "",
base08 = "",
base09 = "",
base0A = "",
base0B = "",
base0C = "",
base0D = "",
base0E = "",
base0F = ""
}
-- OPTIONAL
-- overriding or adding highlights for this specific theme only
-- defaults/treesitter is the filename i.e integration there,
M.polish_hl = {
defaults = {
Comment = {
bg = "#ffffff", -- or M.base_30.cyan
italic = true,
},
},
treesitter = {
["@variable"] = { fg = "#000000" },
},
}
-- set the theme type whether is dark or light
M.type = "dark" -- "or light"
-- this will be later used for users to override your theme table from chadrc
M = require("base46").override_theme(M, "abc")
return M
/lua/themes folder:Inspect or
:InspectTree commands46 followers · starred May 2024
Lua
100.0%
NvChad's base46 theme plugin with caching ( Total re-write )
Lua
307
615 commits
updated Sep 25, 2026
This is supposed to be use with NvChad's UI plugin.
Check its install doc
and then read :h nvui.base46
:hi command will list all highlight groups:hi with args will highlight a highlight grouphi Comment guifg=#ffffff gui=italic, bold:h nvim_set_hl for detailed docvim.api.nvim_set_hl(0, "Comment", {
fg = "#ffffff",
italic = true,
bold = true,
})
There are 2 main tables used for base46
base_30 is used for general UIbase_16 is used for syntax highlightingNote: the below values are mostly approx values so its not compulsory that you have to use those exact numbers, test your theme i.e show it in the PR to get feedback from @siduck
-- this line for types, by hovering and autocompletion (lsp required)
-- will help you understanding properties, fields, and what highlightings the color used for
---@type Base46Table
local M = {}
-- UI
M.base_30 = {
white = "",
black = "", -- usually your theme bg
darker_black = "", -- 6% darker than black
black2 = "", -- 6% lighter than black
one_bg = "", -- 10% lighter than black
one_bg2 = "", -- 6% lighter than one_bg
one_bg3 = "", -- 6% lighter than one_bg2
grey = "", -- 40% lighter than black (the % here depends so choose the perfect grey!)
grey_fg = "", -- 10% lighter than grey
grey_fg2 = "", -- 5% lighter than grey
light_grey = "",
red = "",
baby_pink = "",
pink = "",
line = "", -- 15% lighter than black
green = "",
vibrant_green = "",
nord_blue = "",
blue = "",
seablue = "",
yellow = "", -- 8% lighter than yellow
sun = "",
purple = "",
dark_purple = "",
teal = "",
orange = "",
cyan = "",
statusline_bg = "",
lightbg = "",
pmenu_bg = "",
folder_bg = ""
}
-- check https://github.com/chriskempson/base16/blob/master/styling.md for more info
M.base_16 = {
base00 = "",
base01 = "",
base02 = "",
base03 = "",
base04 = "",
base05 = "",
base06 = "",
base07 = "",
base08 = "",
base09 = "",
base0A = "",
base0B = "",
base0C = "",
base0D = "",
base0E = "",
base0F = ""
}
-- OPTIONAL
-- overriding or adding highlights for this specific theme only
-- defaults/treesitter is the filename i.e integration there,
M.polish_hl = {
defaults = {
Comment = {
bg = "#ffffff", -- or M.base_30.cyan
italic = true,
},
},
treesitter = {
["@variable"] = { fg = "#000000" },
},
}
-- set the theme type whether is dark or light
M.type = "dark" -- "or light"
-- this will be later used for users to override your theme table from chadrc
M = require("base46").override_theme(M, "abc")
return M
/lua/themes folder:Inspect or
:InspectTree commands46 followers · starred May 2024
Lua
100.0%