From ff51589823a87f7ff302ce43d3333e62d15062da Mon Sep 17 00:00:00 2001 From: Thomas Churchman Date: Thu, 18 Jul 2024 18:11:34 +0200 Subject: [PATCH] feat: add Verf color scheme --- README.md | 6 ++ colorschemes/verf.toml | 96 +++++++++++++++++++++++++++++++ media/verf-dark.svg | 125 ++++++++++++++++++++++++++++++++++++++++ media/verf-light.svg | 128 +++++++++++++++++++++++++++++++++++++++++ scripts/screenshots.sh | 2 +- 5 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 colorschemes/verf.toml create mode 100644 media/verf-dark.svg create mode 100644 media/verf-light.svg diff --git a/README.md b/README.md index 6993dc2..a9d3f7d 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,12 @@ A hosted version is available [here](https://hi-nvim-rs.uint.one). [_highlow_](./colorschemes/highlow.toml): a color scheme with high contrast between background and foreground, low color saturation, and low contrast between foreground elements. +| Light | Dark | +|---|---| +| A screenshot of Neovim using the 'verf' light color scheme | A screenshot of Neovim using the 'verf' dark color scheme | + +[_verf_](./colorschemes/verf.toml): a colorful color scheme. + | Light | Dark | |---|---| | A screenshot of Neovim using the 'twocolor' light color scheme | A screenshot of Neovim using the 'twocolor' dark color scheme | diff --git a/colorschemes/verf.toml b/colorschemes/verf.toml new file mode 100644 index 0000000..258b7d9 --- /dev/null +++ b/colorschemes/verf.toml @@ -0,0 +1,96 @@ +name = "verf" +kind = "dark" + +[hues] +red = 15.0 +orange = 62.0 +yellow = 100.0 +green = 135.0 +cyan = 168.0 +blue = 262.0 +purple = 314.0 +pink = 346.0 + +[fg] +lightness = 0.70 +chroma = 0.10 + +[bg] +lightness = 0.30 +chroma = 0.10 + +[colors] +bg = [ 0.15, 0.05, 280 ] +fg = [ 0.70, 0.03, 280 ] +grey = [ 0.70, 0.0, 280 ] + +[themes.ui] +fg = "fg" +fg_dim = { color = "fg", mix = ["bg", 0.1] } +fg_very_dim = { color = "fg", mix = ["bg", 0.3] } + +bg = "bg" +bg_visual = { color = "bg", lighten_absolute = 0.20, saturate = -0.02 } +bg_highlight = { color = "bg", lighten_absolute = 0.20, saturate = 0.04 } +bg_highlight_dim = { color = "bg", lighten_absolute = 0.12, saturate = 0.02 } +bg_border = { color = "fg" } +bg_gutter = { color = "bg", lighten_absolute = 0.1, saturate = -0.01 } +bg_dim = { color = "bg", lighten_absolute = 0.05, saturate = -0.005 } +bg_selected = { color = "bg", lighten_absolute = 0.1 } + +float_bg = { color = "bg", lighten_absolute = 0.02, saturate = 0.01 } +float_fg = { color = "fg", lighten_absolute = 0.02 } +float_border = "fg" + +pmenu_bg = { color = "bg", lighten_absolute = 0.1, saturate = 0.03 } +pmenu_fg = { color = "fg", lighten_absolute = 0.1 } +pmenu_fg_selected = { color = "fg", lighten_absolute = 0.1, saturate = 0.03 } +pmenu_bg_selected = { color = "bg", lighten_absolute = 0.25, saturate = 0.08 } + +special = { color = "fg.purple", lighten_absolute = 0.05, saturate = 0.02 } +nontext = { color = "grey", mix = ["bg", 0.15] } + +[themes.syn] +string = "fg.green" +number = "fg.orange" +constant = "fg.blue" +regex = "fg.yellow" +preproc = "fg.yellow" +type = { color = "fg.cyan", saturate = -0.03 } +variable = "fg" +identifier = "fg" +parameter = { color = "fg.blue", saturate = -0.03 } +function = { color = "fg.blue", saturate = -0.03 } +constructor = { color = "fg.orange", saturate = -0.03 } +statement = { color = "fg.purple", saturate = -0.03 } +keyword = { color = "fg.purple", saturate = -0.03 } +operator = { color = "fg.yellow", saturate = -0.03 } +deprecated = { color = "grey", saturate = -0.03 } +comment = "grey" +special = "fg.yellow" +punctuation = { color = "grey", saturate = -0.03 } + +[themes.diagnostics] +error = { color = "fg.red", saturate = 0.03 } +warning = { color = "fg.orange", saturate = 0.03 } +info = { color = "fg.blue", saturate = 0.03 } +hint = "grey" +ok = { color = "fg.green", saturate = 0.03 } + +[themes.vcs] +removed = "fg.red" +added = "fg.green" +changed = "fg.yellow" + +[themes.diff] +removed = "bg.red" +added = "bg.green" +changed = "bg.yellow" +text = "bg" + +[inverse] +saturate = 0.01 +gamma = 0.80 +lighten_absolute = 0.05 + +[highlights] diff --git a/media/verf-dark.svg b/media/verf-dark.svg new file mode 100644 index 0000000..2430240 --- /dev/null +++ b/media/verf-dark.svg @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +1 +//! Calculate A+B. +2 +//! +3 +//! From: https://rosettacode.org/wiki/A+B +4 +use +std +:: +io +; +5 +6 +fn +main +() +{ +7 +let +mut +line += +String +:: +new +(); +8 +io +:: +stdin +(). +read_line +( +& +mut +line +). +expect +( +"stdin" +); +9 +10 +let +mut +i +: +i64 += +0 +; +11 +for +word +in +line +. +split_whitespace +() +{ +12 +i ++= +word +13 +. +parse +::< +i64 +>() +14 +. +expect +( +"interpret input as numbers" +); +15 +} +16 +println! +( +"{}" +, +i +); +17 +} +~ +./hi-nvim-rs-web/code-examples/rust.rs  14,51          All +-- VISUAL LINE -- +3 + + + diff --git a/media/verf-light.svg b/media/verf-light.svg new file mode 100644 index 0000000..e7fd7e0 --- /dev/null +++ b/media/verf-light.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +//! Calculate A+B. +2 +//! +3 +//! From: https://rosettacode.org/wiki/A+B +4 +use +std +:: +io +; +5 +6 +fn +main +() +{ +7 +let +mut +line += +String +:: +new +(); +8 +io +:: +stdin +(). +read_line +( +& +mut +line +). +expect +( +"stdin" +); +9 +10 +let +mut +i +: +i64 += +0 +; +11 +for +word +in +line +. +split_whitespace +() +{ +12 +i ++= +word +13 +. +parse +::< +i64 +>() +14 +. +expect +( +"interpret input as numbers" +); +15 +} +16 +println! +( +"{}" +, +i +); +17 +} +~ +./hi-nvim-rs-web/code-examples/rust.rs  17,2           All +-- VISUAL LINE -- +6 + + + diff --git a/scripts/screenshots.sh b/scripts/screenshots.sh index 16893e6..cb61233 100755 --- a/scripts/screenshots.sh +++ b/scripts/screenshots.sh @@ -12,7 +12,7 @@ if [ -n "$SCREENSHOT_NVIM" ]; then fi for light_dark in "light" "dark"; do - for colorscheme in "highlow" "twocolor" "grayscale"; do + for colorscheme in "highlow" "verf" "twocolor" "grayscale"; do cargo run -- ./colorschemes/$colorscheme.toml >"$DIR/$colorscheme.vim" (