refactor: palette

This commit is contained in:
mvllow 2021-12-03 09:29:42 -06:00
commit f712b06101

View file

@ -1,4 +1,5 @@
local palette = { local variants = {
main = {
base = '#191724', base = '#191724',
surface = '#1f1d2e', surface = '#1f1d2e',
overlay = '#26233a', overlay = '#26233a',
@ -14,35 +15,8 @@ local palette = {
highlight_low = '#21202e', highlight_low = '#21202e',
highlight_med = '#403d52', highlight_med = '#403d52',
highlight_high = '#524f67', highlight_high = '#524f67',
none = 'NONE', },
} moon = {
if
vim.g.rose_pine_variant == 'dawn'
or vim.g.rose_pine_variant == 'rose-pine-dawn'
then
palette = {
base = '#faf4ed',
surface = '#fffaf3',
overlay = '#f2e9de',
inactive = '#9893a5',
subtle = '#6e6a86',
text = '#575279',
love = '#b4637a',
gold = '#ea9d34',
rose = '#d7827e',
pine = '#286983',
foam = '#56949f',
iris = '#907aa9',
highlight_low = '#f4ede8',
highlight_med = '#dfdad9',
highlight_high = '#cecacd',
}
elseif
vim.g.rose_pine_variant == 'moon'
or vim.g.rose_pine_variant == 'rose-pine-moon'
then
palette = {
base = '#232136', base = '#232136',
surface = '#2a273f', surface = '#2a273f',
overlay = '#393552', overlay = '#393552',
@ -58,7 +32,34 @@ then
highlight_low = '#2a283e', highlight_low = '#2a283e',
highlight_med = '#44415a', highlight_med = '#44415a',
highlight_high = '#56526e', highlight_high = '#56526e',
} },
dawn = {
base = '#faf4ed',
surface = '#fffaf3',
overlay = '#f2e9de',
inactive = '#9893a5',
subtle = '#6e6a86',
text = '#575279',
love = '#b4637a',
gold = '#ea9d34',
rose = '#d7827e',
pine = '#286983',
foam = '#56949f',
iris = '#907aa9',
highlight_low = '#f4ede8',
highlight_med = '#dfdad9',
highlight_high = '#cecacd',
},
}
local palette = variants.main
if string.match(vim.g.rose_pine_variant or '', 'moon') then
palette = variants.moon
elseif string.match(vim.g.rose_pine_variant or '', 'dawn') then
palette = variants.dawn
end end
vim.tbl_deep_extend('force', palette, { none = 'NONE' })
return palette return palette