feat: add functions for darkening/lightening highlight groups
I'm not documenting these yet as I they are probably riddled with bugs,
but they seem to work in the simple test cases that I have tried out so
far. Specifically, I'm doing this in my dotfiles to make floating
windows look better:
local dark = vim.o.background == 'dark'
local factor = dark and 0.15 or -0.15
local normal = pinnacle.adjust_lightness('Normal', factor)
vim.cmd('highlight! clear NormalFloat')
vim.cmd('highlight! NormalFloat ' .. pinnacle.highlight(normal))
normal['fg'] = dark and '#ffffff' or '#000000'
vim.cmd('highlight! clear FloatBorder')
vim.cmd('highlight! FloatBorder ' .. pinnacle.highlight(normal))