Update palette (#58)

* chore: format

* feat!: use new palette

- color "inactive" has been renamed to "muted"
- update subtle and muted colors
This commit is contained in:
not 2022-01-21 20:27:22 -06:00 committed by GitHub
commit e0fd291fb0
7 changed files with 35 additions and 51 deletions

View file

@ -1,3 +1,3 @@
column_width = 80 column_width = 100
indent_type = "Tabs" indent_type = "Tabs"
quote_style = "AutoPreferSingle" quote_style = "AutoPreferSingle"

View file

@ -27,8 +27,8 @@ return {
c = { bg = p.base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
inactive = { inactive = {
a = { bg = p.base, fg = p.inactive, gui = 'bold' }, a = { bg = p.base, fg = p.muted, gui = 'bold' },
b = { bg = p.base, fg = p.inactive }, b = { bg = p.base, fg = p.muted },
c = { bg = p.base, fg = p.inactive }, c = { bg = p.base, fg = p.muted },
}, },
} }

View file

@ -1,19 +1,19 @@
local present, galaxyline_colors = pcall(require, "galaxyline.themes.colors") local present, galaxyline_colors = pcall(require, 'galaxyline.themes.colors')
if not present then if not present then
return return
end end
local palette = require("rose-pine.palette") local palette = require('rose-pine.palette')
galaxyline_colors["rose-pine"] = { galaxyline_colors['rose-pine'] = {
bg = palette.overlay, bg = palette.overlay,
fg = palette.text, fg = palette.text,
fg_alt = palette.subtle, fg_alt = palette.subtle,
yellow = palette.gold, blue = palette.foam,
cyan = palette.foam, cyan = palette.foam,
green = palette.inactive, green = palette.muted,
orange = palette.rose, magenta = palette.iris,
magenta = palette.iris, orange = palette.rose,
blue = palette.foam, red = palette.love,
red = palette.love, yellow = palette.gold,
} }

View file

@ -23,16 +23,7 @@ function M.colorscheme()
local bg = color.bg and 'guibg=' .. color.bg or 'guibg=NONE' local bg = color.bg and 'guibg=' .. color.bg or 'guibg=NONE'
local sp = color.sp and 'guisp=' .. color.sp or '' local sp = color.sp and 'guisp=' .. color.sp or ''
local hl = 'highlight ' local hl = 'highlight ' .. group .. ' ' .. style .. ' ' .. fg .. ' ' .. bg .. ' ' .. sp
.. group
.. ' '
.. style
.. ' '
.. fg
.. ' '
.. bg
.. ' '
.. sp
vim.cmd(hl) vim.cmd(hl)
if color.link then if color.link then
@ -49,7 +40,7 @@ end
function M.set(variant) function M.set(variant)
vim.g.rose_pine_variant = variant vim.g.rose_pine_variant = variant
vim.cmd([[colorscheme rose-pine]]) vim.cmd('colorscheme rose-pine')
end end
function M.toggle(variants) function M.toggle(variants)
@ -64,9 +55,7 @@ function M.toggle(variants)
vim.g.rose_pine_current_variant = index[vim.g.rose_pine_variant] or 0 vim.g.rose_pine_current_variant = index[vim.g.rose_pine_variant] or 0
end end
vim.g.rose_pine_current_variant = ( vim.g.rose_pine_current_variant = (vim.g.rose_pine_current_variant % #variants) + 1
vim.g.rose_pine_current_variant % #variants
) + 1
M.set(variants[vim.g.rose_pine_current_variant]) M.set(variants[vim.g.rose_pine_current_variant])
end end

View file

@ -3,8 +3,8 @@ local variants = {
base = '#191724', base = '#191724',
surface = '#1f1d2e', surface = '#1f1d2e',
overlay = '#26233a', overlay = '#26233a',
inactive = '#555169', muted = '#6e6a86',
subtle = '#6e6a86', subtle = '#908caa',
text = '#e0def4', text = '#e0def4',
love = '#eb6f92', love = '#eb6f92',
gold = '#f6c177', gold = '#f6c177',
@ -20,8 +20,8 @@ local variants = {
base = '#232136', base = '#232136',
surface = '#2a273f', surface = '#2a273f',
overlay = '#393552', overlay = '#393552',
inactive = '#59546d', muted = '#6e6a86',
subtle = '#817c9c', subtle = '#908caa',
text = '#e0def4', text = '#e0def4',
love = '#eb6f92', love = '#eb6f92',
gold = '#f6c177', gold = '#f6c177',
@ -37,8 +37,8 @@ local variants = {
base = '#faf4ed', base = '#faf4ed',
surface = '#fffaf3', surface = '#fffaf3',
overlay = '#f2e9de', overlay = '#f2e9de',
inactive = '#9893a5', muted = '#9893a5',
subtle = '#6e6a86', subtle = '#797593',
text = '#575279', text = '#575279',
love = '#b4637a', love = '#b4637a',
gold = '#ea9d34', gold = '#ea9d34',

View file

@ -54,18 +54,18 @@ local theme = {
FoldColumn = {}, FoldColumn = {},
Folded = { fg = p.text, bg = p.surface }, Folded = { fg = p.text, bg = p.surface },
IncSearch = { bg = p.highlight_med }, IncSearch = { bg = p.highlight_med },
LineNr = { fg = p.inactive }, LineNr = { fg = p.muted },
MatchParen = { fg = p.text, bg = p.highlight_med }, MatchParen = { fg = p.text, bg = p.highlight_med },
ModeMsg = { fg = p.subtle }, ModeMsg = { fg = p.subtle },
MoreMsg = { fg = p.iris }, MoreMsg = { fg = p.iris },
NonText = { fg = p.inactive }, NonText = { fg = p.muted },
Normal = { fg = p.text, bg = maybe_background }, Normal = { fg = p.text, bg = maybe_background },
NormalNC = { fg = p.text, bg = maybe_inactive_background }, NormalNC = { fg = p.text, bg = maybe_inactive_background },
NormalFloat = { fg = p.text, bg = maybe_float_background }, NormalFloat = { fg = p.text, bg = maybe_float_background },
Pmenu = { fg = p.subtle, bg = maybe_float_background }, Pmenu = { fg = p.subtle, bg = maybe_float_background },
PmenuSbar = { bg = p.overlay }, PmenuSbar = { bg = p.overlay },
PmenuSel = { fg = p.text, bg = p.overlay }, PmenuSel = { fg = p.text, bg = p.overlay },
PmenuThumb = { bg = p.inactive }, PmenuThumb = { bg = p.muted },
Question = { fg = p.gold }, Question = { fg = p.gold },
-- QuickFixLine = {}, -- QuickFixLine = {},
Search = { fg = p.iris, bg = p.highlight_high }, Search = { fg = p.iris, bg = p.highlight_high },
@ -81,7 +81,7 @@ local theme = {
-- StatusLineTermNC = {}, -- StatusLineTermNC = {},
TabLine = { fg = p.subtle, bg = p.overlay }, TabLine = { fg = p.subtle, bg = p.overlay },
TabLineFill = { bg = p.surface }, TabLineFill = { bg = p.surface },
TabLineSel = { fg = p.text, bg = p.inactive }, TabLineSel = { fg = p.text, bg = p.muted },
Title = { fg = p.text }, Title = { fg = p.text },
VertSplit = maybe_bold_vert_split, VertSplit = maybe_bold_vert_split,
Visual = { bg = p.highlight_med }, Visual = { bg = p.highlight_med },
@ -317,12 +317,12 @@ local theme = {
BufferInactive = { fg = p.subtle }, BufferInactive = { fg = p.subtle },
BufferInactiveIndex = { fg = p.subtle }, BufferInactiveIndex = { fg = p.subtle },
BufferInactiveMod = { fg = p.foam }, BufferInactiveMod = { fg = p.foam },
BufferInactiveSign = { fg = p.inactive }, BufferInactiveSign = { fg = p.muted },
BufferInactiveTarget = { fg = p.gold }, BufferInactiveTarget = { fg = p.gold },
BufferVisible = { fg = p.subtle }, BufferVisible = { fg = p.subtle },
BufferVisibleIndex = { fg = p.subtle }, BufferVisibleIndex = { fg = p.subtle },
BufferVisibleMod = { fg = p.foam }, BufferVisibleMod = { fg = p.foam },
BufferVisibleSign = { fg = p.inactive }, BufferVisibleSign = { fg = p.muted },
BufferVisibleTarget = { fg = p.gold }, BufferVisibleTarget = { fg = p.gold },
-- gitsigns.nvim -- gitsigns.nvim
@ -350,7 +350,7 @@ local theme = {
NvimTreeFileNew = { fg = p.foam }, NvimTreeFileNew = { fg = p.foam },
NvimTreeFileRenamed = { fg = p.pine }, NvimTreeFileRenamed = { fg = p.pine },
NvimTreeFileStaged = { fg = p.iris }, NvimTreeFileStaged = { fg = p.iris },
NvimTreeEmptyFolderName = { fg = p.inactive }, NvimTreeEmptyFolderName = { fg = p.muted },
NvimTreeFolderIcon = { fg = p.subtle }, NvimTreeFolderIcon = { fg = p.subtle },
NvimTreeFolderName = { fg = p.foam }, NvimTreeFolderName = { fg = p.foam },
NvimTreeImageFile = { fg = p.text }, NvimTreeImageFile = { fg = p.text },

View file

@ -26,12 +26,7 @@ function util.blend(fg, bg, alpha)
return math.floor(math.min(math.max(0, ret), 255) + 0.5) return math.floor(math.min(math.max(0, ret), 255) + 0.5)
end end
return string.format( return string.format('#%02X%02X%02X', blendChannel(1), blendChannel(2), blendChannel(3))
'#%02X%02X%02X',
blendChannel(1),
blendChannel(2),
blendChannel(3)
)
end end
return util return util