update build to derive term colors
This commit is contained in:
@@ -19,7 +19,7 @@ colors:
|
|||||||
bright:
|
bright:
|
||||||
black: '#B3C6B6'
|
black: '#B3C6B6'
|
||||||
red: '#94253E'
|
red: '#94253E'
|
||||||
green: '#466522'
|
green: '#3F5A22'
|
||||||
yellow: '#803D1C'
|
yellow: '#803D1C'
|
||||||
blue: '#1D5573'
|
blue: '#1D5573'
|
||||||
magenta: '#7B3B70'
|
magenta: '#7B3B70'
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
<key>Color Space</key>
|
<key>Color Space</key>
|
||||||
<string>sRGB</string>
|
<string>sRGB</string>
|
||||||
<key>Green Component</key>
|
<key>Green Component</key>
|
||||||
<real>0.3960784313725490</real>
|
<real>0.3529411764705883</real>
|
||||||
<key>Red Component</key>
|
<key>Red Component</key>
|
||||||
<real>0.2745098039215687</real>
|
<real>0.2470588235294118</real>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Ansi 11 Color</key>
|
<key>Ansi 11 Color</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ color7 #202E18
|
|||||||
# bright
|
# bright
|
||||||
color8 #B3C6B6
|
color8 #B3C6B6
|
||||||
color9 #94253E
|
color9 #94253E
|
||||||
color10 #466522
|
color10 #3F5A22
|
||||||
color11 #803D1C
|
color11 #803D1C
|
||||||
color12 #1D5573
|
color12 #1D5573
|
||||||
color13 #7B3B70
|
color13 #7B3B70
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ selection_bg = "#B1EA90"
|
|||||||
selection_fg = "#202E18"
|
selection_fg = "#202E18"
|
||||||
|
|
||||||
ansi = ["#E5EDE6", "#A8334C", "#567A30", "#944927", "#286486", "#88507D", "#3B8992", "#202E18"]
|
ansi = ["#E5EDE6", "#A8334C", "#567A30", "#944927", "#286486", "#88507D", "#3B8992", "#202E18"]
|
||||||
brights = ["#B3C6B6", "#94253E", "#466522", "#803D1C", "#1D5573", "#7B3B70", "#2B747C", "#415934"]
|
brights = ["#B3C6B6", "#94253E", "#3F5A22", "#803D1C", "#1D5573", "#7B3B70", "#2B747C", "#415934"]
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ local function write_template(path, template, values)
|
|||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
function build(name, specs, palette, terminal, options)
|
function build(name, specs, palette, options)
|
||||||
local exclude = options.exclude or {}
|
local exclude = options.exclude or {}
|
||||||
local templates = { "vim", "iterm", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
|
local templates = { "vim", "iterm", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
|
||||||
for _, t in ipairs(templates) do
|
for _, t in ipairs(templates) do
|
||||||
if not vim.tbl_contains(exclude, t) then
|
if not vim.tbl_contains(exclude, t) then
|
||||||
write_template(unpack(require("zenbones.template." .. t)(name, specs, palette, terminal)))
|
write_template(unpack(require("zenbones.template." .. t)(name, specs, palette)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -24,7 +24,7 @@ function M.run()
|
|||||||
-- default
|
-- default
|
||||||
package.loaded["zenbones"] = nil
|
package.loaded["zenbones"] = nil
|
||||||
local p = require "zenbones.palette"
|
local p = require "zenbones.palette"
|
||||||
build("zenbones", require "zenbones", p, require("zenbones.term").colors, {})
|
build("zenbones", require "zenbones", p, {})
|
||||||
|
|
||||||
-- bright
|
-- bright
|
||||||
package.loaded["zenbones"] = nil
|
package.loaded["zenbones"] = nil
|
||||||
@@ -33,7 +33,6 @@ function M.run()
|
|||||||
"zenbones_bright",
|
"zenbones_bright",
|
||||||
require "zenbones",
|
require "zenbones",
|
||||||
require "zenbones.palette",
|
require "zenbones.palette",
|
||||||
require("zenbones.term").colors,
|
|
||||||
{ exclude = { "vim", "lightline", "lualine" } }
|
{ exclude = { "vim", "lightline", "lualine" } }
|
||||||
)
|
)
|
||||||
vim.api.nvim_del_var "zenbones_lightness"
|
vim.api.nvim_del_var "zenbones_lightness"
|
||||||
@@ -45,14 +44,13 @@ function M.run()
|
|||||||
"zenbones_dim",
|
"zenbones_dim",
|
||||||
require "zenbones",
|
require "zenbones",
|
||||||
require "zenbones.palette",
|
require "zenbones.palette",
|
||||||
require("zenbones.term").colors,
|
|
||||||
{ exclude = { "vim", "lightline", "lualine" } }
|
{ exclude = { "vim", "lightline", "lualine" } }
|
||||||
)
|
)
|
||||||
vim.api.nvim_del_var "zenbones_lightness"
|
vim.api.nvim_del_var "zenbones_lightness"
|
||||||
|
|
||||||
-- default
|
-- default
|
||||||
package.loaded["zenflesh"] = nil
|
package.loaded["zenflesh"] = nil
|
||||||
build("zenflesh", require "zenflesh", require "zenflesh.palette", require("zenflesh.term").colors, {})
|
build("zenflesh", require "zenflesh", require "zenflesh.palette", {})
|
||||||
|
|
||||||
-- stark
|
-- stark
|
||||||
package.loaded["zenflesh"] = nil
|
package.loaded["zenflesh"] = nil
|
||||||
@@ -61,7 +59,6 @@ function M.run()
|
|||||||
"zenflesh_stark",
|
"zenflesh_stark",
|
||||||
require "zenflesh",
|
require "zenflesh",
|
||||||
require "zenflesh.palette",
|
require "zenflesh.palette",
|
||||||
require("zenflesh.term").colors,
|
|
||||||
{ exclude = { "vim", "lightline", "lualine" } }
|
{ exclude = { "vim", "lightline", "lualine" } }
|
||||||
)
|
)
|
||||||
vim.api.nvim_del_var "zenflesh_darkness"
|
vim.api.nvim_del_var "zenflesh_darkness"
|
||||||
@@ -73,32 +70,19 @@ function M.run()
|
|||||||
"zenflesh_warm",
|
"zenflesh_warm",
|
||||||
require "zenflesh",
|
require "zenflesh",
|
||||||
require "zenflesh.palette",
|
require "zenflesh.palette",
|
||||||
require("zenflesh.term").colors,
|
|
||||||
{ exclude = { "vim", "lightline", "lualine" } }
|
{ exclude = { "vim", "lightline", "lualine" } }
|
||||||
)
|
)
|
||||||
vim.api.nvim_del_var "zenflesh_darkness"
|
vim.api.nvim_del_var "zenflesh_darkness"
|
||||||
|
|
||||||
-- neobones light
|
-- neobones light
|
||||||
package.loaded["zenbones.neobones"] = nil
|
package.loaded["neobones"] = nil
|
||||||
vim.opt.background = "light"
|
vim.opt.background = "light"
|
||||||
build(
|
build("neobones_light", require "neobones", require("neobones.palette").zenbones, { exclude = { "vim" } })
|
||||||
"neobones_light",
|
|
||||||
require "zenbones.neobones",
|
|
||||||
require "zenbones.neobones.palette",
|
|
||||||
require("zenbones.neobones.term").colors.zenbones,
|
|
||||||
{ exclude = { "vim" } }
|
|
||||||
)
|
|
||||||
|
|
||||||
-- neobones dark
|
-- neobones dark
|
||||||
package.loaded["zenbones.neobones"] = nil
|
package.loaded["neobones"] = nil
|
||||||
vim.opt.background = "dark"
|
vim.opt.background = "dark"
|
||||||
build(
|
build("neobones_dark", require "neobones", require("neobones.palette").zenflesh, { exclude = { "vim" } })
|
||||||
"neobones_dark",
|
|
||||||
require "zenbones.neobones",
|
|
||||||
require "zenbones.neobones.palette",
|
|
||||||
require("zenbones.neobones.term").colors.zenflesh,
|
|
||||||
{ exclude = { "vim" } }
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ colors:
|
|||||||
white: '${color15}'
|
white: '${color15}'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local values = {
|
local values = {
|
||||||
name = name,
|
name = name,
|
||||||
bg = theme.Normal.bg.hex,
|
bg = specs.Normal.bg.hex,
|
||||||
fg = theme.Normal.fg.hex,
|
fg = specs.Normal.fg.hex,
|
||||||
}
|
}
|
||||||
for i, v in ipairs(term) do
|
for i, v in ipairs(term) do
|
||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ local function key_to_xml(key, color)
|
|||||||
return xml
|
return xml
|
||||||
end
|
end
|
||||||
|
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local colors = {
|
local colors = {
|
||||||
["Ansi 0"] = term[1],
|
["Ansi 0"] = term[1],
|
||||||
["Ansi 1"] = term[2],
|
["Ansi 1"] = term[2],
|
||||||
@@ -61,17 +62,17 @@ return function(name, theme, palette, term)
|
|||||||
["Ansi 13"] = term[14],
|
["Ansi 13"] = term[14],
|
||||||
["Ansi 14"] = term[15],
|
["Ansi 14"] = term[15],
|
||||||
["Ansi 15"] = term[16],
|
["Ansi 15"] = term[16],
|
||||||
Foreground = theme.Normal.fg,
|
Foreground = specs.Normal.fg,
|
||||||
Background = theme.Normal.bg,
|
Background = specs.Normal.bg,
|
||||||
Bold = term[9],
|
Bold = term[9],
|
||||||
Cursor = theme.Cursor.bg,
|
Cursor = specs.Cursor.bg,
|
||||||
["Cursor Text"] = theme.Cursor.fg,
|
["Cursor Text"] = specs.Cursor.fg,
|
||||||
["Cursor Guide"] = theme.CursorLine.bg,
|
["Cursor Guide"] = specs.CursorLine.bg,
|
||||||
Link = term[13],
|
Link = term[13],
|
||||||
Selection = theme.Visual.bg,
|
Selection = specs.Visual.bg,
|
||||||
["Selected Text"] = theme.Normal.fg,
|
["Selected Text"] = specs.Normal.fg,
|
||||||
Badge = theme.Comment.fg,
|
Badge = specs.Comment.fg,
|
||||||
Tab = theme.Normal.bg,
|
Tab = specs.Normal.bg,
|
||||||
}
|
}
|
||||||
|
|
||||||
local template = start_template
|
local template = start_template
|
||||||
|
|||||||
@@ -40,20 +40,21 @@ color14 ${color14}
|
|||||||
color15 ${color15}
|
color15 ${color15}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
local bg = theme.Normal.bg.hex
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local fg = theme.Normal.fg.hex
|
local bg = specs.Normal.bg.hex
|
||||||
|
local fg = specs.Normal.fg.hex
|
||||||
local values = {
|
local values = {
|
||||||
name = name,
|
name = name,
|
||||||
background = bg,
|
background = bg,
|
||||||
foreground = fg,
|
foreground = fg,
|
||||||
selection_background = theme.Visual.bg.hex,
|
selection_background = specs.Visual.bg.hex,
|
||||||
selection_foreground = fg,
|
selection_foreground = fg,
|
||||||
url_color = term[13].hex,
|
url_color = term[13].hex,
|
||||||
cursor = fg,
|
cursor = fg,
|
||||||
active_tab_background = theme.Search.bg.hex,
|
active_tab_background = specs.Search.bg.hex,
|
||||||
active_tab_foreground = fg,
|
active_tab_foreground = fg,
|
||||||
inactive_tab_background = theme.StatusLine.bg.hex,
|
inactive_tab_background = specs.StatusLine.bg.hex,
|
||||||
inactive_tab_foreground = fg,
|
inactive_tab_foreground = fg,
|
||||||
}
|
}
|
||||||
for i, v in ipairs(term) do
|
for i, v in ipairs(term) do
|
||||||
|
|||||||
@@ -23,31 +23,31 @@ let s:p.tabline.tabsel = [ [ "${tabsel_fg}", "${tabsel_bg}", "bold" ] ]
|
|||||||
let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p)
|
let g:lightline#colorscheme#zenbones#palette = lightline#colorscheme#fill(s:p)
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, terminal)
|
return function(name, specs, p)
|
||||||
return {
|
return {
|
||||||
string.format("autoload/lightline/colorscheme/%s.vim", name),
|
string.format("autoload/lightline/colorscheme/%s.vim", name),
|
||||||
template,
|
template,
|
||||||
{
|
{
|
||||||
common_fg = theme.Folded.fg.hex,
|
common_fg = specs.Folded.fg.hex,
|
||||||
inactive_bg = theme.StatusLineNC.bg.hex,
|
inactive_bg = specs.StatusLineNC.bg.hex,
|
||||||
inactive_fg = theme.StatusLineNC.fg.hex,
|
inactive_fg = specs.StatusLineNC.fg.hex,
|
||||||
normal_a_bg = theme.PmenuSbar.bg.hex,
|
normal_a_bg = specs.PmenuSbar.bg.hex,
|
||||||
normal_b_bg = theme.PmenuSel.bg.hex,
|
normal_b_bg = specs.PmenuSel.bg.hex,
|
||||||
normal_c_bg = theme.StatusLine.bg.hex,
|
normal_c_bg = specs.StatusLine.bg.hex,
|
||||||
normal_c_fg = theme.StatusLine.fg.hex,
|
normal_c_fg = specs.StatusLine.fg.hex,
|
||||||
insert_a_bg = theme.DiffText.bg.hex,
|
insert_a_bg = specs.DiffText.bg.hex,
|
||||||
visual_a_bg = theme.Visual.bg.hex,
|
visual_a_bg = specs.Visual.bg.hex,
|
||||||
replace_a_bg = theme.DiffDelete.bg.hex,
|
replace_a_bg = specs.DiffDelete.bg.hex,
|
||||||
tabline_left_bg = theme.PmenuSel.bg.hex,
|
tabline_left_bg = specs.PmenuSel.bg.hex,
|
||||||
tabline_left_fg = theme.Normal.fg.hex,
|
tabline_left_fg = specs.Normal.fg.hex,
|
||||||
tabline_right_bg = theme.PmenuSel.bg.hex,
|
tabline_right_bg = specs.PmenuSel.bg.hex,
|
||||||
tabline_right_fg = theme.Normal.fg.hex,
|
tabline_right_fg = specs.Normal.fg.hex,
|
||||||
tabsel_bg = theme.Normal.bg.hex,
|
tabsel_bg = specs.Normal.bg.hex,
|
||||||
tabsel_fg = theme.Normal.fg.hex,
|
tabsel_fg = specs.Normal.fg.hex,
|
||||||
warning_bg = theme.DiagnosticVirtualTextWarn.bg.hex,
|
warning_bg = specs.DiagnosticVirtualTextWarn.bg.hex,
|
||||||
warning_fg = theme.DiagnosticVirtualTextWarn.fg.hex,
|
warning_fg = specs.DiagnosticVirtualTextWarn.fg.hex,
|
||||||
error_bg = theme.LspDiagnosticsVirtualTextError.bg.hex,
|
error_bg = specs.LspDiagnosticsVirtualTextError.bg.hex,
|
||||||
error_fg = theme.LspDiagnosticsVirtualTextError.fg.hex,
|
error_fg = specs.LspDiagnosticsVirtualTextError.fg.hex,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,22 +34,22 @@ return {
|
|||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, terminal)
|
return function(name, specs, p)
|
||||||
return {
|
return {
|
||||||
string.format("lua/lualine/themes/%s.lua", name),
|
string.format("lua/lualine/themes/%s.lua", name),
|
||||||
template,
|
template,
|
||||||
{
|
{
|
||||||
common_fg = theme.Folded.fg.hex,
|
common_fg = specs.Folded.fg.hex,
|
||||||
inactive_bg = theme.StatusLineNC.bg.hex,
|
inactive_bg = specs.StatusLineNC.bg.hex,
|
||||||
inactive_fg = theme.StatusLineNC.fg.hex,
|
inactive_fg = specs.StatusLineNC.fg.hex,
|
||||||
normal_a_bg = theme.PmenuSbar.bg.hex,
|
normal_a_bg = specs.PmenuSbar.bg.hex,
|
||||||
normal_b_bg = theme.PmenuSel.bg.hex,
|
normal_b_bg = specs.PmenuSel.bg.hex,
|
||||||
normal_c_bg = theme.StatusLine.bg.hex,
|
normal_c_bg = specs.StatusLine.bg.hex,
|
||||||
normal_c_fg = theme.StatusLine.fg.hex,
|
normal_c_fg = specs.StatusLine.fg.hex,
|
||||||
insert_a_bg = theme.DiffText.bg.hex,
|
insert_a_bg = specs.DiffText.bg.hex,
|
||||||
command_a_bg = theme.Search.bg.hex,
|
command_a_bg = specs.Search.bg.hex,
|
||||||
visual_a_bg = theme.Visual.bg.hex,
|
visual_a_bg = specs.Visual.bg.hex,
|
||||||
replace_a_bg = theme.DiffDelete.bg.hex,
|
replace_a_bg = specs.DiffDelete.bg.hex,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,9 +18,10 @@ set -g clock-mode-colour '${color5}'
|
|||||||
set -g mode-style fg='${color0}',bg='${selection_background}'
|
set -g mode-style fg='${color0}',bg='${selection_background}'
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local values = {
|
local values = {
|
||||||
selection_background = theme.Visual.bg.hex,
|
selection_background = specs.Visual.bg.hex,
|
||||||
}
|
}
|
||||||
for i, v in ipairs(term) do
|
for i, v in ipairs(term) do
|
||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
|
|||||||
@@ -44,14 +44,15 @@ endif
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local lush = require "lush"
|
local lush = require "lush"
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local termcolors = ""
|
local termcolors = ""
|
||||||
for i, v in ipairs(term) do
|
for i, v in ipairs(term) do
|
||||||
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v.hex)
|
termcolors = termcolors .. string.format("let g:terminal_color_%s = '%s'\n", (i - 1), v.hex)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Compile lush table, concatenate to a single string, and remove blend property
|
-- Compile lush table, concatenate to a single string, and remove blend property
|
||||||
local vimcolors = table.concat(vim.fn.sort(lush.compile(theme, { exclude_keys = { "blend" } })), "\n")
|
local vimcolors = table.concat(vim.fn.sort(lush.compile(specs, { exclude_keys = { "blend" } })), "\n")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
string.format("colors/%s.vim", name),
|
string.format("colors/%s.vim", name),
|
||||||
|
|||||||
@@ -13,18 +13,19 @@ ansi = ["${color0}", "${color1}", "${color2}", "${color3}", "${color4}", "${colo
|
|||||||
brights = ["${color8}", "${color9}", "${color10}", "${color11}", "${color12}", "${color13}", "${color14}", "${color15}"]
|
brights = ["${color8}", "${color9}", "${color10}", "${color11}", "${color12}", "${color13}", "${color14}", "${color15}"]
|
||||||
]]
|
]]
|
||||||
|
|
||||||
return function(name, theme, palette, term)
|
return function(name, specs, p)
|
||||||
|
local term = require("zenbones.term").colors_map(p)
|
||||||
local name = name:sub(1, 1):upper() .. name:sub(2)
|
local name = name:sub(1, 1):upper() .. name:sub(2)
|
||||||
|
|
||||||
local values = {
|
local values = {
|
||||||
name = name,
|
name = name,
|
||||||
fg = theme.Normal.fg.hex,
|
fg = specs.Normal.fg.hex,
|
||||||
bg = theme.Normal.bg.hex,
|
bg = specs.Normal.bg.hex,
|
||||||
cursor_bg = theme.Cursor.bg.hex,
|
cursor_bg = specs.Cursor.bg.hex,
|
||||||
cursor_border = theme.Cursor.fg.hex,
|
cursor_border = specs.Cursor.fg.hex,
|
||||||
cursor_fg = theme.Cursor.fg.hex,
|
cursor_fg = specs.Cursor.fg.hex,
|
||||||
selection_bg = theme.Visual.bg.hex,
|
selection_bg = specs.Visual.bg.hex,
|
||||||
selection_fg = theme.Normal.fg.hex,
|
selection_fg = specs.Normal.fg.hex,
|
||||||
}
|
}
|
||||||
for i, v in ipairs(term) do
|
for i, v in ipairs(term) do
|
||||||
values["color" .. (i - 1)] = v.hex
|
values["color" .. (i - 1)] = v.hex
|
||||||
|
|||||||
Reference in New Issue
Block a user