Files
zenbones-theme/doc/zenbones.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

311 lines
10 KiB
Plaintext
Raw Normal View History

2021-10-27 09:15:29 +00:00
*zenbones.txt* A collection of contrast-based vim/neovim colorschemes
2021-08-27 02:01:48 +00:00
==============================================================================
Table of Contents *zenbones-table-of-contents*
2021-09-18 08:12:24 +00:00
1. Zenbones |zenbones-zenbones|
2021-08-27 08:09:41 +00:00
- Usage |zenbones-usage|
2021-08-30 01:35:08 +00:00
- Configuration |zenbones-configuration|
2021-08-31 02:48:36 +00:00
- Advanced Usage |zenbones-advanced-usage|
2021-08-27 02:01:48 +00:00
2021-09-18 08:12:24 +00:00
==============================================================================
1. Zenbones *zenbones-zenbones*
2021-08-27 02:01:48 +00:00
2021-09-18 08:12:24 +00:00
**Zenflesh, Zenbones** is a vim/neovim colorscheme designed to highlight code
using contrasts and font variations. Colors are tasked only for other roles
such as diagnostics, diffs, search matches.
2021-08-27 02:01:48 +00:00
2021-08-27 08:35:18 +00:00
USAGE *zenbones-usage*
2021-08-27 02:01:48 +00:00
Just apply the colorscheme as usual:
>
2021-10-27 09:15:29 +00:00
set termguicolors
2021-09-17 11:55:56 +00:00
colorscheme zenbones " light
colorscheme zenflesh " dark
2021-09-21 11:30:30 +00:00
2021-10-27 09:15:29 +00:00
colorscheme zenwritten " Zero hue and saturation version
colorscheme neobones " https://neovim.io flavor
colorscheme rosebones " Rosé Pine flavor - https://rosepinetheme.com
colorscheme forestbones " Everforest flavor - https://github.com/sainnhe/everforest
colorscheme nordbones " Nord flavor - https://www.nordtheme.com/docs/colors-and-palettes
colorscheme tokyobones " Tokyo Night flavor - https://github.com/enkia/tokyo-night-vscode-theme#color-palette
2021-08-27 02:01:48 +00:00
<
It works pretty much the same as the first one but pretty handy when extending
or customizing the colors to your likings.
2021-08-30 01:35:08 +00:00
CONFIGURATION *zenbones-configuration*
2021-10-10 07:09:46 +00:00
Configuration is only available for neovim.
2021-08-31 02:48:36 +00:00
2021-10-20 09:58:01 +00:00
**Note**: Flavors accept their own configuration by replacing the prefix with
the flavor name e.g. `g:rosebones_italic_comments`. Just remember: `zenbones_`
are for the `light` background and `zenflesh_` is for the dark.
2021-10-20 09:31:20 +00:00
2021-10-27 09:15:29 +00:00
Another way to set configuration is to assign a dictionary to the prefix:
>
let g:forestbones = #{ solid_line_nr: v:true }
<
Or in lua:
>
vim.g.forestbones = { solid_line_nr = true }
<
2021-08-30 01:35:08 +00:00
*zenbones-g:zenbones_lightness*
2021-09-01 05:21:19 +00:00
g:zenbones_lightness Change background colors lightness.
2021-09-18 08:08:27 +00:00
Options: `'bright'`, `'dim'`.
2021-08-30 01:35:08 +00:00
2021-09-17 11:55:56 +00:00
*zenbones-g:zenflesh_darkness*
2021-08-30 01:35:08 +00:00
2021-09-17 11:55:56 +00:00
g:zenflesh_darkness Change background colors darkness.
2021-09-18 08:08:27 +00:00
Options: `'stark'`, `'warm'`.
2021-09-17 11:55:56 +00:00
2021-08-30 01:35:08 +00:00
2021-08-31 02:48:36 +00:00
*zenbones-g:zenbones_solid_vert_split*
2021-09-17 11:55:56 +00:00
*zenbones-g:zenflesh_solid_vert_split*
2021-10-26 09:36:29 +00:00
g:zenflesh_solid_vert_split Default: `v:false`. Solid |hl-VertSplit|
2021-10-20 09:31:20 +00:00
background.
2021-10-26 09:36:29 +00:00
*zenbones-g:zenbones_solid_line_nr*
2021-10-20 09:31:20 +00:00
2021-10-26 09:36:29 +00:00
*zenbones-g:zenflesh_solid_line_nr*
g:zenflesh_solid_line_nr Default: `v:false`. Solid |hl-LineNr|
2021-10-20 09:31:20 +00:00
background.
*zenbones-g:zenbones_solid_float_border*
*zenbones-g:zenflesh_solid_float_border*
2021-10-26 09:36:29 +00:00
g:zenflesh_solid_float_border Default: `v:false`. Make
|hl-FloatBorder| have a more
distinguishable background highlight.
2021-09-18 08:12:24 +00:00
2021-08-31 02:48:36 +00:00
2021-10-20 09:31:20 +00:00
*zenbones-g:zenbones_darken_noncurrent_window*
2021-08-31 02:48:36 +00:00
2021-10-20 09:31:20 +00:00
g:zenbones_darken_noncurrent_window Default: `v:false`. Make non-current
window background darker than _Normal_.
2021-09-05 01:23:38 +00:00
2021-09-17 11:55:56 +00:00
*zenbones-g:zenflesh_lighten_noncurrent_window*
2021-09-18 08:17:07 +00:00
g:zenflesh_lighten_noncurrent_window Default: `v:false`. Make non-current
2021-10-20 22:35:35 +00:00
window background lighter than _Normal_.
2021-09-17 11:55:56 +00:00
*zenbones-g:zenbones_italic_comments*
*zenbones-g:zenflesh_italic_comments*
2021-09-30 23:42:01 +00:00
g:zenflesh_italic_comments Default: `v:true`. Make comments
2021-09-18 08:17:07 +00:00
italicize.
2021-09-17 11:55:56 +00:00
2021-10-20 09:31:20 +00:00
*zenbones-g:zenbones_darken_comments*
g:zenbones_darken_comments Default: 38. Percentage to darken
2021-10-26 09:36:29 +00:00
comments relative to Normal bg. See also
2021-10-20 09:31:20 +00:00
|lush-color-darken|.
*zenbones-g:zenflesh_lighten_comments*
g:zenflesh_lighten_comments Default: 38. Percentage to lighten
2021-10-26 09:36:29 +00:00
comments relative to Normal bg. See also
2021-10-20 09:31:20 +00:00
|lush-color-lighten|.
2021-10-26 09:36:29 +00:00
*zenbones-g:zenbones_darken_non_text*
2021-10-26 09:49:24 +00:00
g:zenbones_darken_non_text Default: 25. Percentage to darken
2021-10-26 09:36:29 +00:00
|hl-NonText| relative to Normal bg. See
also |lush-color-darken|.
2021-10-27 09:21:27 +00:00
*zenbones-g:zenflesh_lighten_non_text*
2021-10-26 09:36:29 +00:00
2021-10-27 09:21:27 +00:00
g:zenflesh_lighten_non_text Default: 30. Percentage to lighten
2021-10-26 09:36:29 +00:00
|hl-NonText| relative to Normal bg. See
also |lush-color-darken|.
*zenbones-g:zenbones_darken_line_nr*
g:zenbones_darken_line_nr Default: 33. Percentage to darken
|hl-LineNr| relative to Normal bg. See
also |lush-color-darken|.
*zenbones-g:zenflesh_lighten_line_nr*
g:zenflesh_lighten_line_nr Default: 35. Percentage to lighten
|hl-LineNr| relative to Normal bg. See
also |lush-color-darken|.
2021-10-10 11:28:39 +00:00
*zenbones-g:zenbones_compat*
g:zenbones_compat Set to `1` to turn on compatibility
mode.
2021-09-30 23:42:01 +00:00
*zenbones-lightline*
>
let g:lightline = {
\ 'colorscheme': 'zenbones', " or 'zenflesh'
\ }
<
*zenbones-lualine*
>
options = { theme = 'zenbones' } -- or 'zenflesh'
<
2021-09-05 00:19:48 +00:00
ADVANCED USAGE *zenbones-advanced-usage*
2021-09-12 06:41:36 +00:00
Zenbones is pretty extensible thanks to Lush. You can easily retrieve the
colors in lua:
2021-09-05 00:19:48 +00:00
>
2021-09-17 11:55:56 +00:00
local theme = require "zenbones" -- or zenflesh
2021-09-12 14:19:33 +08:00
local palette = require "zenbones.palette"
2021-09-05 00:19:48 +00:00
print(theme.StatusLine.bg.hex)
2021-09-17 11:55:56 +00:00
print(palette.blossom.darken(20).hex)
2021-09-05 00:19:48 +00:00
<
2021-08-31 02:48:36 +00:00
2021-10-11 05:57:15 +00:00
Heres an example of how to extend/override some highlights.
`lua/customize_zenbones.lua`:
2021-10-10 07:09:46 +00:00
>
local function customize_zenbones()
if vim.g.colors_name ~= "zenbones" then
return
end
local lush = require "lush"
local base = require "zenbones"
2021-10-11 05:57:15 +00:00
-- Create some specs
2021-10-10 07:09:46 +00:00
local specs = lush.parse(function()
return {
TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic"
2021-10-20 09:31:20 +00:00
2021-10-10 07:09:46 +00:00
end)
2021-10-11 05:57:15 +00:00
-- Apply specs using lush tool-chain
2021-10-10 07:09:46 +00:00
lush.apply(lush.compile(specs))
end
return customize_zenbones
<
2021-10-11 05:57:15 +00:00
And then somewhere in your `init.vim`:
2021-10-10 07:09:46 +00:00
>
autocmd VimEnter,ColorScheme * lua require("customize_zenbones")()
<
2021-09-05 01:23:38 +00:00
See also Lushs documentation
2021-09-12 06:41:36 +00:00
<https://github.com/rktjmp/lush.nvim#advanced-usage> for more options.
2021-08-31 02:48:36 +00:00
2021-09-22 10:22:33 +00:00
CREATE YOUR OWN COLORSCHEME ~
2021-10-27 09:15:29 +00:00
You can ultimately create your own colorscheme that is based on zenbones by
2021-10-11 05:57:15 +00:00
defining a palette and generating a specs. Best way to demonstrate this is
through an example. Lets make a zenbones-flavored Gruvbox colorscheme called
`gruvbones`.
2021-09-22 10:22:33 +00:00
2021-10-20 22:35:35 +00:00
Lets define our |colorscheme| in `colors/gruvbones.lua`. It contains the
following:
2021-09-22 10:22:33 +00:00
>
2021-10-20 22:35:35 +00:00
local colors_name = "gruvbones"
vim.g.colors_name = colors_name -- Required when defining a colorscheme
2021-09-22 10:22:33 +00:00
local lush = require "lush"
2021-10-11 05:57:15 +00:00
local hsluv = lush.hsluv -- Human-friendly hsl
2021-10-10 07:09:46 +00:00
local util = require "zenbones.util"
2021-10-11 06:44:18 +00:00
local bg = vim.opt.background:get()
2021-09-22 10:22:33 +00:00
2021-10-11 05:57:15 +00:00
-- Define a palette. Use `palette_extend` to fill unspecified colors
-- Based on https://github.com/gruvbox-community/gruvbox#palette
2021-10-10 07:09:46 +00:00
local palette
2021-10-11 06:44:18 +00:00
if bg == "light" then
2021-10-10 07:09:46 +00:00
palette = util.palette_extend({
bg = hsluv "#fbf1c7",
fg = hsluv "#3c3836",
rose = hsluv "#9d0006",
leaf = hsluv "#79740e",
wood = hsluv "#b57614",
water = hsluv "#076678",
blossom = hsluv "#8f3f71",
sky = hsluv "#427b58",
2021-10-20 22:35:35 +00:00
}, bg)
2021-09-22 10:22:33 +00:00
else
2021-10-10 07:09:46 +00:00
palette = util.palette_extend({
bg = hsluv "#282828",
fg = hsluv "#ebdbb2",
rose = hsluv "#fb4934",
leaf = hsluv "#b8bb26",
wood = hsluv "#fabd2f",
water = hsluv "#83a598",
blossom = hsluv "#d3869b",
sky = hsluv "#83c07c",
2021-10-20 22:35:35 +00:00
}, bg)
2021-09-22 10:22:33 +00:00
end
2021-10-11 05:57:15 +00:00
-- Generate the lush specs using the generator util
2021-10-11 06:44:18 +00:00
local generator = require "zenbones.specs"
2021-10-20 22:35:35 +00:00
local base_specs = generator.generate(palette, bg, generator.get_global_config(colors_name, bg))
2021-09-22 10:22:33 +00:00
2021-10-11 05:57:15 +00:00
-- Optionally extend specs using Lush
2021-10-10 07:09:46 +00:00
local specs = lush.extends({ base_specs }).with(function()
2021-09-22 10:22:33 +00:00
return {
2021-10-10 07:09:46 +00:00
Statement { base_specs.Statement, fg = palette.rose },
Special { fg = palette.water },
Type { fg = palette.sky, gui = "italic" },
2021-09-22 10:22:33 +00:00
}
end)
2021-10-11 05:57:15 +00:00
-- Pass the specs to lush to apply
2021-09-22 10:22:33 +00:00
lush(specs)
2021-10-10 07:09:46 +00:00
2021-10-11 05:57:15 +00:00
-- Optionally set term colors
2021-10-10 07:09:46 +00:00
require("zenbones.term").apply_colors(palette)
2021-09-22 10:22:33 +00:00
<
And there you have it. Just call `colorscheme gruvbones` to use your new
colorscheme. It respects `&background` and other configurations too.
2021-10-10 07:09:46 +00:00
Also checkout the neobones <../colors/neobones.lua> and rosebones
2021-10-04 12:03:45 +00:00
<../colors/rosebones.lua> colorscheme for a similar and complete example.
2021-09-22 10:22:33 +00:00
2021-08-27 21:02:03 +00:00
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
2021-08-27 02:01:48 +00:00
vim:tw=78:ts=8:noet:ft=help:norl: