Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lunarvim/colorgen-nvim
:rocket: Blazingly fast colorscheme generator for Neovim written in Rust :crab:
https://github.com/lunarvim/colorgen-nvim
colorscheme colorscheme-generator lua neovim nvim rust
Last synced: 4 days ago
JSON representation
:rocket: Blazingly fast colorscheme generator for Neovim written in Rust :crab:
- Host: GitHub
- URL: https://github.com/lunarvim/colorgen-nvim
- Owner: LunarVim
- License: gpl-3.0
- Created: 2022-07-15T02:21:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-19T18:35:24.000Z (7 months ago)
- Last Synced: 2024-12-24T13:15:05.482Z (4 days ago)
- Topics: colorscheme, colorscheme-generator, lua, neovim, nvim, rust
- Language: Rust
- Homepage:
- Size: 146 KB
- Stars: 233
- Watchers: 3
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![banner](./assets/colorgen.png?raw=true 'banner')
# colorgen-nvim
🚀 A colorscheme generator for Neovim written in Rust 🦀
## Installing
From `crates.io`:
```sh
cargo install colorgen-nvim
```For development version
```sh
cargo install --git https://github.com/ChristianChiarulli/colorgen-nvim
```## Usage
Create a toml file containing your highlight groups, there is an example in this repo called `user_template.toml`
**_NOTE_**: You can call this file whatever you want
```sh
colorgen-nvim user_template.toml
```## Template
The template must contain a `information` section and a `palette` section
Example:
```toml
[information]
name = "onedarker"
background = "dark"
author = 'Christian Chiarulli '[palette]
fg = '#abb2bf'
bg = '#1e222a'white = '#abb2bf'
gray = '#545862'
blue = '#519fdf'
green = '#88b369'
cyan = '#46a6b2'
red = '#d05c65'
orange = '#c18a56'
yellow = '#d5b06b'
purple = '#b668cd'
magenta = '#D16D9E'
```You can define color options in the palette section and use them later to set colors for different highlight groups
Example:
```toml
[highlights]
Normal = 'fg bg'
SignColumn = '- bg'
MsgArea = 'fg bg'
ModeMsg = 'fg bg'
MsgSeparator = 'fg bg'
SpellBad = 'red - u'
SpellCap = 'yellow - u'
SpellLocal = 'green - u'
SpellRare = 'purple - u'
NormalNC = 'fg bg'
Pmenu = 'red bg - - 50'
PmenuSel = '- blue'
WildMenu = 'fg blue'
CursorLineNr = 'light_gray - b'
Comment = 'gray - i'[Treesitter]
TSComment = 'link:Comment'
TSAnnotation = 'blue'
TSAttribute = 'cyan'
TSConstructor = 'cyan'
TSType = 'cyan'
```The format is `foreground background style special blend`
You can also choose to link a highlight group to another by passing `link:`
The `-` is used to skip a particular section and replace it with `NONE`
Style Options:
- `o`: standout
- `u`: underline
- `c`: undercurl
- `d`: underdouble
- `t`: underdotted
- `h`: underdashed
- `s`: strikethrough
- `i`: italic
- `b`: bold
- `r`: reverse
- `n`: nocombineYou can also generate global variables for the colorscheme, which might be needed for some plugins.
```toml
[global]
variable = ""
```Where `""` accepts any string.
TODO:
- support transparent background (this could get tricky with other plugins, considering bg:optional, if you put that then setting the transparent flag will set it to none)
- italic comments
## Inspiration and Credits
- [vim-felipec](https://github.com/felipec/vim-felipec)
- [ez.nvim](https://github.com/murtaza-u/ez.nvim)