When modifying the custom highlight groups in your theme file, such as "onedark.lua", it is important to note that only the variables from "base_30" can be used for this purpose.
Although hex colors can also be used in the "fg/bg" field, it is recommended to utilize the variable names (e.g. "blue", "darker_black", "one_bg", etc.) from your theme file as they will provide a better aesthetic. This way, there is no need to manually write the hex colors.
M.ui = {
hl_override = {
Pmenu = { bg = "white" },
-- Pmenu = { bg = "#ffffff" }, this works too
MyHighlightGroup = { -- custom highlights are also allowed
fg = "red",
bg = "darker_black"
}
},
}
In order to add custom highlights, its the same as above, just use hl_add
.
If you just want to customize an already existing theme, you can change the following configuration:
M.ui = {
changed_themes = {
onedark = {
base_16 = {
base00 = "#mycol",
},
base_30 = {
red = "#mycol",
white = "#mycol",
},
},
nord = {
-- and so on!
},
},
}
WARNING: Do this at your own risk because you might not be able to make nice nvchad themes like siduck.
base46
repository.Here is the default structure for NvChad themes:
-- place the file in /custom/themes/<theme-name>.lua
-- for example: custom/themes/siduck.lua
local M = {}
M.base_30 = {
-- 30 colors based on base_16
}
M.base_16 = {
-- base16 colors
}
M.type = "dark" -- light / dark
return M
Finally, add your theme in chadrc.
M.ui = {
theme = "siduck",
}