no need to manually convert to hex
This commit is contained in:
@@ -54,32 +54,32 @@ local function transform(colors)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local text = helpers.apply_template(template, colors)
|
local text = helpers.apply_template(template, colors)
|
||||||
return helpers.split_newlines(text)
|
return { text }
|
||||||
end
|
end
|
||||||
|
|
||||||
local function specs_to_colors(specs)
|
local function specs_to_colors(specs)
|
||||||
return {
|
return {
|
||||||
name = name,
|
name = name,
|
||||||
common_fg = specs.Folded.fg.hex,
|
common_fg = specs.Folded.fg,
|
||||||
inactive_bg = specs.StatusLineNC.bg.hex,
|
inactive_bg = specs.StatusLineNC.bg,
|
||||||
inactive_fg = specs.StatusLineNC.fg.hex,
|
inactive_fg = specs.StatusLineNC.fg,
|
||||||
normal_a_bg = specs.PmenuSbar.bg.hex,
|
normal_a_bg = specs.PmenuSbar.bg,
|
||||||
normal_b_bg = specs.PmenuSel.bg.hex,
|
normal_b_bg = specs.PmenuSel.bg,
|
||||||
normal_c_bg = specs.StatusLine.bg.hex,
|
normal_c_bg = specs.StatusLine.bg,
|
||||||
normal_c_fg = specs.StatusLine.fg.hex,
|
normal_c_fg = specs.StatusLine.fg,
|
||||||
insert_a_bg = specs.DiffText.bg.hex,
|
insert_a_bg = specs.DiffText.bg,
|
||||||
visual_a_bg = specs.Visual.bg.hex,
|
visual_a_bg = specs.Visual.bg,
|
||||||
replace_a_bg = specs.DiffDelete.bg.hex,
|
replace_a_bg = specs.DiffDelete.bg,
|
||||||
tabline_left_bg = specs.PmenuSel.bg.hex,
|
tabline_left_bg = specs.PmenuSel.bg,
|
||||||
tabline_left_fg = specs.Normal.fg.hex,
|
tabline_left_fg = specs.Normal.fg,
|
||||||
tabline_right_bg = specs.PmenuSel.bg.hex,
|
tabline_right_bg = specs.PmenuSel.bg,
|
||||||
tabline_right_fg = specs.Normal.fg.hex,
|
tabline_right_fg = specs.Normal.fg,
|
||||||
tabsel_bg = specs.Normal.bg.hex,
|
tabsel_bg = specs.Normal.bg,
|
||||||
tabsel_fg = specs.Normal.fg.hex,
|
tabsel_fg = specs.Normal.fg,
|
||||||
warning_bg = specs.DiagnosticVirtualTextWarn.bg.hex,
|
warning_bg = specs.DiagnosticVirtualTextWarn.bg,
|
||||||
warning_fg = specs.DiagnosticVirtualTextWarn.fg.hex,
|
warning_fg = specs.DiagnosticVirtualTextWarn.fg,
|
||||||
error_bg = specs.DiagnosticVirtualTextError.bg.hex,
|
error_bg = specs.DiagnosticVirtualTextError.bg,
|
||||||
error_fg = specs.DiagnosticVirtualTextError.fg.hex,
|
error_fg = specs.DiagnosticVirtualTextError.fg,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -55,22 +55,22 @@ local function transform(colors)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local text = helpers.apply_template(template, colors)
|
local text = helpers.apply_template(template, colors)
|
||||||
return helpers.split_newlines(text)
|
return { text }
|
||||||
end
|
end
|
||||||
|
|
||||||
local function specs_to_colors(specs)
|
local function specs_to_colors(specs)
|
||||||
return {
|
return {
|
||||||
common_fg = specs.Folded.fg.hex,
|
common_fg = specs.Folded.fg,
|
||||||
inactive_bg = specs.StatusLineNC.bg.hex,
|
inactive_bg = specs.StatusLineNC.bg,
|
||||||
inactive_fg = specs.StatusLineNC.fg.hex,
|
inactive_fg = specs.StatusLineNC.fg,
|
||||||
normal_a_bg = specs.PmenuSbar.bg.hex,
|
normal_a_bg = specs.PmenuSbar.bg,
|
||||||
normal_b_bg = specs.PmenuSel.bg.hex,
|
normal_b_bg = specs.PmenuSel.bg,
|
||||||
normal_c_bg = specs.StatusLine.bg.hex,
|
normal_c_bg = specs.StatusLine.bg,
|
||||||
normal_c_fg = specs.StatusLine.fg.hex,
|
normal_c_fg = specs.StatusLine.fg,
|
||||||
insert_a_bg = specs.DiffText.bg.hex,
|
insert_a_bg = specs.DiffText.bg,
|
||||||
command_a_bg = specs.Search.bg.hex,
|
command_a_bg = specs.Search.bg,
|
||||||
visual_a_bg = specs.Visual.bg.hex,
|
visual_a_bg = specs.Visual.bg,
|
||||||
replace_a_bg = specs.DiffDelete.bg.hex,
|
replace_a_bg = specs.DiffDelete.bg,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,30 +2,30 @@ local M = {}
|
|||||||
|
|
||||||
M.colorscheme_to_term_colors = function(colorscheme)
|
M.colorscheme_to_term_colors = function(colorscheme)
|
||||||
local specs, _, term = unpack(colorscheme)
|
local specs, _, term = unpack(colorscheme)
|
||||||
local fg = specs.Normal.fg.hex
|
local fg = specs.Normal.fg
|
||||||
return {
|
return {
|
||||||
fg = fg,
|
fg = fg,
|
||||||
bg = specs.Normal.bg.hex,
|
bg = specs.Normal.bg,
|
||||||
cursor_fg = specs.Cursor.fg.hex,
|
cursor_fg = specs.Cursor.fg,
|
||||||
cursor_bg = specs.Cursor.bg.hex,
|
cursor_bg = specs.Cursor.bg,
|
||||||
selection_bg = specs.Visual.bg.hex,
|
selection_bg = specs.Visual.bg,
|
||||||
selection_fg = fg,
|
selection_fg = fg,
|
||||||
black = term[1].hex,
|
black = term[1],
|
||||||
red = term[2].hex,
|
red = term[2],
|
||||||
green = term[3].hex,
|
green = term[3],
|
||||||
yellow = term[4].hex,
|
yellow = term[4],
|
||||||
blue = term[5].hex,
|
blue = term[5],
|
||||||
magenta = term[6].hex,
|
magenta = term[6],
|
||||||
cyan = term[7].hex,
|
cyan = term[7],
|
||||||
white = term[8].hex,
|
white = term[8],
|
||||||
bright_black = term[9].hex,
|
bright_black = term[9],
|
||||||
bright_red = term[10].hex,
|
bright_red = term[10],
|
||||||
bright_green = term[11].hex,
|
bright_green = term[11],
|
||||||
bright_yellow = term[12].hex,
|
bright_yellow = term[12],
|
||||||
bright_blue = term[13].hex,
|
bright_blue = term[13],
|
||||||
bright_magenta = term[14].hex,
|
bright_magenta = term[14],
|
||||||
bright_cyan = term[15].hex,
|
bright_cyan = term[15],
|
||||||
bright_white = term[16].hex,
|
bright_white = term[16],
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user