https://github.com/grecodavide/custom16
My custom colorscheme, based on given palette, that supports hot reloading
https://github.com/grecodavide/custom16
lua neovim neovim-colorscheme neovim-theme nvim
Last synced: 6 months ago
JSON representation
My custom colorscheme, based on given palette, that supports hot reloading
- Host: GitHub
- URL: https://github.com/grecodavide/custom16
- Owner: grecodavide
- Created: 2025-01-03T19:05:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-03T19:08:51.000Z (over 1 year ago)
- Last Synced: 2025-01-03T20:21:43.494Z (over 1 year ago)
- Topics: lua, neovim, neovim-colorscheme, neovim-theme, nvim
- Language: Lua
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My custom colorscheme.
## Rationale
I have a script that manages all my tools' palette. For this reason, I wanted a colorscheme
that changed accordingly too. This accomplishes just that, while also never changing
the actual colorscheme: the color "green" will change, but what is displayed as "green" will not.
## How to use
To use this, you have to call setup with a lua path to you palette: if your palette
is in `$XDG_CONFIG_HOME/nvim/lua/config/palette.lua`, then (using lazy.nvim) you would call
```lua
return {
"https://codeberg.org/davidegreco/custom16",
lazy = false,
priority = 1000,
opts = {
palette_path = "config.palette",
},
},
```
Here is an example of a palette:
```lua
-- must return the palette
return {
-- base 16 colors
main = {
"#141410",
"#cc241d",
"#98971a",
"#d79921",
"#458588",
"#b16286",
"#24837b",
"#d5c18e",
"#282828",
"#792329",
"#98971a",
"#d65d0e",
"#7daea3",
"#8f3f71",
"#689d6a",
"#ebdbb2",
},
extras = {
accent = "#24837b", -- used to display some things like current line nr, LSP server..
inactivelinenr = "#877b5b", -- color for numbers other than current line
comment = "#746a4f", -- comments color
split = "#9b8d67", -- color for split separator
cursorline = "#15221c", -- color for cursorline. I like to set it same as accent, but dimmed
}
}
```
Note that this supports hot reloading, so if you change the palette and then set again the colorscheme (e.g. `:colorscheme custom16`), it will update the colors immediately.