update build to derive term colors

This commit is contained in:
Michael Chris Lopez
2021-10-10 13:43:40 +08:00
parent 79d7ffd17f
commit 8e9a4cbd91
13 changed files with 83 additions and 93 deletions

View File

@@ -13,18 +13,19 @@ ansi = ["${color0}", "${color1}", "${color2}", "${color3}", "${color4}", "${colo
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 values = {
name = name,
fg = theme.Normal.fg.hex,
bg = theme.Normal.bg.hex,
cursor_bg = theme.Cursor.bg.hex,
cursor_border = theme.Cursor.fg.hex,
cursor_fg = theme.Cursor.fg.hex,
selection_bg = theme.Visual.bg.hex,
selection_fg = theme.Normal.fg.hex,
fg = specs.Normal.fg.hex,
bg = specs.Normal.bg.hex,
cursor_bg = specs.Cursor.bg.hex,
cursor_border = specs.Cursor.fg.hex,
cursor_fg = specs.Cursor.fg.hex,
selection_bg = specs.Visual.bg.hex,
selection_fg = specs.Normal.fg.hex,
}
for i, v in ipairs(term) do
values["color" .. (i - 1)] = v.hex