no need to manually convert to hex

This commit is contained in:
Michael Chris Lopez
2021-11-06 11:03:27 +08:00
parent e122642ac3
commit de8f1bdad8
3 changed files with 54 additions and 54 deletions

View File

@@ -54,32 +54,32 @@ local function transform(colors)
end
local text = helpers.apply_template(template, colors)
return helpers.split_newlines(text)
return { text }
end
local function specs_to_colors(specs)
return {
name = name,
common_fg = specs.Folded.fg.hex,
inactive_bg = specs.StatusLineNC.bg.hex,
inactive_fg = specs.StatusLineNC.fg.hex,
normal_a_bg = specs.PmenuSbar.bg.hex,
normal_b_bg = specs.PmenuSel.bg.hex,
normal_c_bg = specs.StatusLine.bg.hex,
normal_c_fg = specs.StatusLine.fg.hex,
insert_a_bg = specs.DiffText.bg.hex,
visual_a_bg = specs.Visual.bg.hex,
replace_a_bg = specs.DiffDelete.bg.hex,
tabline_left_bg = specs.PmenuSel.bg.hex,
tabline_left_fg = specs.Normal.fg.hex,
tabline_right_bg = specs.PmenuSel.bg.hex,
tabline_right_fg = specs.Normal.fg.hex,
tabsel_bg = specs.Normal.bg.hex,
tabsel_fg = specs.Normal.fg.hex,
warning_bg = specs.DiagnosticVirtualTextWarn.bg.hex,
warning_fg = specs.DiagnosticVirtualTextWarn.fg.hex,
error_bg = specs.DiagnosticVirtualTextError.bg.hex,
error_fg = specs.DiagnosticVirtualTextError.fg.hex,
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_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_fg = specs.Normal.fg,
tabline_right_bg = specs.PmenuSel.bg,
tabline_right_fg = specs.Normal.fg,
tabsel_bg = specs.Normal.bg,
tabsel_fg = specs.Normal.fg,
warning_bg = specs.DiagnosticVirtualTextWarn.bg,
warning_fg = specs.DiagnosticVirtualTextWarn.fg,
error_bg = specs.DiagnosticVirtualTextError.bg,
error_fg = specs.DiagnosticVirtualTextError.fg,
}
end

View File

@@ -55,22 +55,22 @@ local function transform(colors)
end
local text = helpers.apply_template(template, colors)
return helpers.split_newlines(text)
return { text }
end
local function specs_to_colors(specs)
return {
common_fg = specs.Folded.fg.hex,
inactive_bg = specs.StatusLineNC.bg.hex,
inactive_fg = specs.StatusLineNC.fg.hex,
normal_a_bg = specs.PmenuSbar.bg.hex,
normal_b_bg = specs.PmenuSel.bg.hex,
normal_c_bg = specs.StatusLine.bg.hex,
normal_c_fg = specs.StatusLine.fg.hex,
insert_a_bg = specs.DiffText.bg.hex,
command_a_bg = specs.Search.bg.hex,
visual_a_bg = specs.Visual.bg.hex,
replace_a_bg = specs.DiffDelete.bg.hex,
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_c_fg = specs.StatusLine.fg,
insert_a_bg = specs.DiffText.bg,
command_a_bg = specs.Search.bg,
visual_a_bg = specs.Visual.bg,
replace_a_bg = specs.DiffDelete.bg,
}
end