Something went wrong. Try again.
🫦 Themes for (Neo)vim
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334local M = {}
function M.get_palette(flavour) local flvr = flavour or require("folk").flavour or vim.g.folk_flavour or "mocha" local _, palette = pcall(require, "folk.palettes." .. flvr) local O = require("folk").options local ans = vim.tbl_deep_extend("keep", O.color_overrides.all or {}, O.color_overrides[flvr] or {}, palette or {})
--[[ Kitty makes Neovim transparent if its own terminal background matches Neovim, so we need to adjust the color channels to make sure people don't suddenly have a transparent background if they haven't specified it.
Unfortunately, this currently means all users on Kitty will have all their palette colors slightly offset.
ref: https://github.com/kovidgoyal/kitty/issues/2917 --]] if O.kitty then for accent, hex in pairs(ans) do local red_green_string = hex:sub(1, 5) local blue_value = tonumber(hex:sub(6, 7), 16)
-- Slightly increase or decrease brightness of the blue channel blue_value = blue_value == 255 and blue_value - 1 or blue_value + 1 ans[accent] = string.format("%s%.2x", red_green_string, blue_value) end end
return ansend
return M