adjust lightline contrast

to be the same as lualine
This commit is contained in:
Michael Chris Lopez
2021-12-03 18:43:20 +08:00
parent 5f691f0e42
commit 20dac6d4ab
2 changed files with 9 additions and 9 deletions

View File

@@ -57,22 +57,23 @@ local function transform(colors)
end
local function specs_to_colors(colorscheme)
local specs, name = unpack(colorscheme)
local specs, name, background = unpack(colorscheme)
local da = background == "light" and -3 or 3
return {
name = name,
common_fg = specs.Folded.fg,
inactive_bg = specs.StatusLineNC.bg,
inactive_fg = specs.StatusLineNC.fg,
normal_a_bg = specs.PmenuSbar.bg,
normal_b_bg = specs.PmenuSel.bg,
normal_c_bg = specs.StatusLine.bg,
normal_a_bg = specs.PmenuSbar.bg.abs_da(da),
normal_b_bg = specs.PmenuSel.bg.abs_da(da),
normal_c_bg = specs.StatusLine.bg.abs_da(da),
normal_c_fg = specs.StatusLine.fg,
insert_a_bg = specs.DiffText.bg,
visual_a_bg = specs.Visual.bg,
replace_a_bg = specs.DiffDelete.bg,
tabline_left_bg = specs.PmenuSel.bg,
tabline_left_bg = specs.PmenuSel.bg.abs_da(da),
tabline_left_fg = specs.Normal.fg,
tabline_right_bg = specs.PmenuSel.bg,
tabline_right_bg = specs.PmenuSel.bg.abs_da(da),
tabline_right_fg = specs.Normal.fg,
tabsel_bg = specs.Normal.bg,
tabsel_fg = specs.Normal.fg,
@@ -86,7 +87,7 @@ end
---@diagnostic disable: undefined-global
-- selene: allow(undefined_variable)
run(
{ specs, name },
{ specs, name, background },
specs_to_colors,
transform,
{ prepend, [[" This file is auto-generated by shipwright.nvim]] },