background = { -- map the value of 'background' option to a theme
dark = "zen", -- try "ink" !
light = "pearl"
},
})
-- setup must be called before loading
vim.cmd("colorscheme kanso")
```
<details>
<summary><strong>💡 Important Notes</strong></summary>
**Compilation:** If you enable compilation, make sure to run `:KansōCompile` command every time you make changes to your config.
```vim
" 1. Modify your config
" 2. Restart nvim
" 3. Run this command:
:KansōCompile
```
**Options:** Kansō adjusts to the value of some options. Make sure that the options `'laststatus'` and `'cmdheight'` are set **_before_** calling `setup`.
</details>
## 🎨 Themes
Kansō comes in three beautiful variants:
-`Zen` (Dark)
-`Ink` (Dark)
-`Pearl` (Light)
<div>
<h3>✧ Zen ✧</h3>
<p>Deep & rich dark theme for focused coding.</p>
<img src="kanso_zen.png" width="900">
<br/><br/>
<h3>✧ Ink ✧</h3>
<p>Balanced theme with elegant contrast.</p>
<img src="kanso_ink.png" width="900">
<br/><br/>
<h3>✧ Pearl ✧</h3>
<p>Light theme for daytime productivity.</p>
<img src="kanso_pearl.png" width="900">
</div>
<br/>
<details>
<summary><strong>🔄 Switching Between Themes</strong></summary>
Themes can be changed in three ways:
1. Setting `config.theme` to the desired theme.
2. Using the `background` option:
Any change to the value of `vim.o.background` will select the theme mapped by `config.background`.
3. Loading the colorscheme directly with:
```lua
vim.cmd("colorscheme kanso-zen")
vim.cmd("colorscheme kanso-kage")
vim.cmd("colorscheme kanso-pearl")
```
or
```lua
require("kanso").load("zen")
```
</details>
## 🧰 Customization
In Kansō, there are _two_ kinds of colors: `PaletteColors` and `ThemeColors`;
`PaletteColors` are defined directly as RGB Hex strings, and have arbitrary names
that recall their actual color. Conversely, `ThemeColors` are named and grouped _semantically_
on the basis of their actual function.
In short, a `palette` defines all the available colors, while a `theme` maps the `PaletteColors`
to specific `ThemeColors` and the same palette color may be assigned to multiple theme colors.
<details>
<summary><strong>📝 Color Customization Example</strong></summary>
You can change _both_ theme or palette colors using `config.colors`.
All the palette color names can be found [here](lua/kanso/colors.lua),
while their usage by each theme can be found [here](lua/kanso/themes.lua).
```lua
require('kanso').setup({
...,
colors = {
palette = {
-- change all usages of these colors
zen0 = "#000000",
fujiWhite = "#FFFFFF",
},
theme = {
-- change specific usages for a certain theme, or for all of them
<summary><strong>🔧 Highlight Group Overrides</strong></summary>
You can also conveniently add/modify any `hlgroups` using the `config.overrides` option, allowing you to customize the looks of specific built-in elements, or any other external plugins that provides `hlgroups`. (See `:help highlight` for more information on `hlgroups`.)
Supported keywords are the same for `:h nvim_set_hl``{val}` parameter.