refactor: palette

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

View file

@ -1,48 +1,22 @@
local palette = { local variants = {
base = '#191724', main = {
surface = '#1f1d2e', base = '#191724',
overlay = '#26233a', surface = '#1f1d2e',
inactive = '#555169', overlay = '#26233a',
subtle = '#6e6a86', inactive = '#555169',
text = '#e0def4',
love = '#eb6f92',
gold = '#f6c177',
rose = '#ebbcba',
pine = '#31748f',
foam = '#9ccfd8',
iris = '#c4a7e7',
highlight_low = '#21202e',
highlight_med = '#403d52',
highlight_high = '#524f67',
none = 'NONE',
}
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', subtle = '#6e6a86',
text = '#575279', text = '#e0def4',
love = '#b4637a', love = '#eb6f92',
gold = '#ea9d34', gold = '#f6c177',
rose = '#d7827e', rose = '#ebbcba',
pine = '#286983', pine = '#31748f',
foam = '#56949f', foam = '#9ccfd8',
iris = '#907aa9', iris = '#c4a7e7',
highlight_low = '#f4ede8', highlight_low = '#21202e',
highlight_med = '#dfdad9', highlight_med = '#403d52',
highlight_high = '#cecacd', highlight_high = '#524f67',
} },
elseif moon = {
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