2021-09-10 18:00:01 +08:00
|
|
|
local M = {}
|
2021-08-26 14:47:56 +08:00
|
|
|
|
2021-10-10 13:24:02 +08:00
|
|
|
function M.colors_map(p)
|
|
|
|
|
return {
|
|
|
|
|
p.bg,
|
|
|
|
|
p.rose,
|
|
|
|
|
p.leaf,
|
|
|
|
|
p.wood,
|
|
|
|
|
p.water,
|
|
|
|
|
p.blossom,
|
|
|
|
|
p.sky,
|
|
|
|
|
p.fg,
|
|
|
|
|
p.bg1,
|
|
|
|
|
p.rose1,
|
|
|
|
|
p.leaf1,
|
|
|
|
|
p.wood1,
|
|
|
|
|
p.water1,
|
|
|
|
|
p.blossom1,
|
|
|
|
|
p.sky1,
|
|
|
|
|
p.fg1,
|
|
|
|
|
}
|
|
|
|
|
end
|
2021-08-26 14:31:14 +08:00
|
|
|
|
2021-10-10 13:24:02 +08:00
|
|
|
function M.apply_colors(p)
|
|
|
|
|
local colors = M.colors_map(p)
|
2021-08-26 14:31:14 +08:00
|
|
|
for i, v in ipairs(colors) do
|
|
|
|
|
vim.g["terminal_color_" .. (i - 1)] = v.hex
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|