Refacto palette and theme, added more colors
This commit is contained in:
136
lua/astrobox/theme.lua
Normal file
136
lua/astrobox/theme.lua
Normal file
@@ -0,0 +1,136 @@
|
||||
local M = {}
|
||||
|
||||
---@param P Palette
|
||||
---@param C Config
|
||||
---@return Theme
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
function M.make_theme(P, C)
|
||||
---@class Theme
|
||||
local T = {
|
||||
none = { fg = P.none, bg = P.none },
|
||||
normal = { fg = P.fg, bg = P.bg },
|
||||
inverted = { fg = P.bg, bg = P.fg },
|
||||
inactive = { fg = P.fg_gradiant[4] },
|
||||
conceal = { fg = P.bg_gradiant[3], bg = P.harder_bg },
|
||||
active = { fg = P.none, bg = P.softer_bg },
|
||||
}
|
||||
T.colors = {
|
||||
accent = P.blue,
|
||||
accent2 = P.green,
|
||||
accent3 = P.aqua,
|
||||
}
|
||||
T.backgrounds = {
|
||||
red = { fg = P.none, bg = P.colored_backgrounds.red },
|
||||
green = { fg = P.none, bg = P.colored_backgrounds.green },
|
||||
yellow = { fg = P.none, bg = P.colored_backgrounds.yellow },
|
||||
blue = { fg = P.none, bg = P.colored_backgrounds.blue },
|
||||
purple = { fg = P.none, bg = P.colored_backgrounds.purple },
|
||||
aqua = { fg = P.none, bg = P.colored_backgrounds.aqua },
|
||||
orange = { fg = P.none, bg = P.colored_backgrounds.orange },
|
||||
}
|
||||
T.diff = {
|
||||
normal = {
|
||||
add = { fg = P.green, bg = P.none },
|
||||
text = { fg = P.yellow, bg = P.none },
|
||||
change = { fg = P.blue, bg = P.none },
|
||||
del = { fg = P.red, bg = P.none },
|
||||
merge = { fg = P.purple, bg = P.none },
|
||||
staged = { fg = P.aqua, bg = P.none },
|
||||
},
|
||||
bg = {
|
||||
add = T.backgrounds.green,
|
||||
text = T.backgrounds.yellow,
|
||||
change = T.backgrounds.blue,
|
||||
del = T.backgrounds.red,
|
||||
},
|
||||
}
|
||||
T.msg = {
|
||||
error = { fg = P.red, bg = P.none },
|
||||
warning = { fg = P.yellow, bg = P.none },
|
||||
info = { fg = P.blue, bg = P.none },
|
||||
hint = { fg = P.aqua, bg = P.none },
|
||||
}
|
||||
T.files = {
|
||||
directory = { fg = T.colors.accent },
|
||||
file = { fg = T.normal.fg },
|
||||
root = { fg = T.normal.fg, bold = true },
|
||||
|
||||
added = { fg = T.colors.diffadd },
|
||||
changed = { fg = T.colors.difftext },
|
||||
untracked = { fg = P.orange },
|
||||
}
|
||||
T.scrollbar = { fg = P.none, bg = P.colored_backgrounds.blue }
|
||||
T.windows = {
|
||||
separator = { fg = P.fg_gradiant[4], bg = P.none },
|
||||
}
|
||||
T.popup = {
|
||||
normal = {
|
||||
fg = P.fg,
|
||||
bg = P.bg_gradiant[1],
|
||||
},
|
||||
conceal = T.conceal,
|
||||
inactive = {
|
||||
fg = P.fg_gradiant[4],
|
||||
bg = P.bg_gradiant[2],
|
||||
},
|
||||
-- TODO Check if working good
|
||||
border = C.float_no_borders and { fg = P.none, bg = P.none } or T.windows.separator,
|
||||
title = { fg = T.colors.accent2, bg = P.none, bold = true }, -- TODO need to switch to normal.bg?
|
||||
title2 = { fg = T.colors.accent3, bg = P.none, bold = true }, -- TODO need to switch to normal.bg?
|
||||
}
|
||||
T.selection = {
|
||||
fg = P.fg,
|
||||
bg = P.colored_backgrounds.blue,
|
||||
}
|
||||
T.menu = {
|
||||
normal = { fg = P.fg_gradiant[1], bg = P.harder_bg },
|
||||
selection = { fg = P.fg_gradiant[1], bg = T.selection.bg },
|
||||
}
|
||||
T.statusbar = {
|
||||
normal = {
|
||||
fg = P.fg_gradiant[1],
|
||||
bg = P.harder_bg,
|
||||
},
|
||||
active = {
|
||||
fg = P.fg_gradiant[1],
|
||||
bg = P.harder_bg,
|
||||
},
|
||||
inactive = {
|
||||
fg = P.fg,
|
||||
bg = P.bg_gradiant[1],
|
||||
},
|
||||
}
|
||||
T.winbar = {
|
||||
normal = {
|
||||
fg = P.fg_gradiant[1],
|
||||
bg = P.harder_bg,
|
||||
},
|
||||
inactive = {
|
||||
fg = P.bg_gradiant[3],
|
||||
bg = P.harder_bg,
|
||||
},
|
||||
}
|
||||
T.term_colors = {
|
||||
P.bg,
|
||||
P.term_colors.red,
|
||||
P.term_colors.green,
|
||||
P.term_colors.yellow,
|
||||
P.term_colors.blue,
|
||||
P.term_colors.purple,
|
||||
P.term_colors.aqua,
|
||||
P.fg_gradiant[4],
|
||||
P.gray,
|
||||
P.red,
|
||||
P.green,
|
||||
P.yellow,
|
||||
P.blue,
|
||||
P.purple,
|
||||
P.aqua,
|
||||
P.fg,
|
||||
}
|
||||
|
||||
T.error = { fg = "#000000", bg = "#FF00FF" }
|
||||
return T
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user