craftzdog.solarized-osaka.nvim/lua/solarized-osaka/groups/barbar.lua
Takuya Matsuyama 0df74ef0ed refactor(colors): Source every color from the palette and drop darken
Point the last computed colors at real tokens so nothing is derived by
blending anymore:

- barbar inactive labels take the new 600 tier, which reads dimmer than
  the 500 accent and, unlike 700, still brightens under the vivid style
- notify borders take the 900 tier, and the debug border takes base02
- black was a blend of the background toward pure black, a value that
  appeared nowhere in the palette; it is base04, so replace it outright
- border was aliased to black, leaving it invisible against the
  background in the dark style; it is now base02, matching WinSeparator

With no callers left, darken and blend go, and with them the mutable
util.bg they relied on -- a shared global whose value depended on which
style had been resolved last.

Every highlight group is unchanged by the black removal. The barbar and
notify groups do shift slightly, since a token can never reproduce a
blend toward the background exactly; they were chosen to read correctly
rather than to match the old values.

Light gains from this: black resolved to a muddy #cac4b5 that measured
1.85:1 on statusline mode chips, and base04 lifts that to 3.21:1. The
same change makes terminal color0 white in the light style, completing
an inversion that already had color7 resolving to a dark value.
2026-08-11 15:38:54 +09:00

49 lines
2.4 KiB
Lua

local M = {}
function M.get(c, opts)
--stylua: ignore
return {
BufferCurrent = { bg = c.bg, fg = c.fg },
BufferCurrentERROR = { bg = c.bg, fg = c.error },
BufferCurrentHINT = { bg = c.bg, fg = c.hint },
BufferCurrentINFO = { bg = c.bg, fg = c.info },
BufferCurrentWARN = { bg = c.bg, fg = c.warning },
BufferCurrentIndex = { bg = c.bg, fg = c.info },
BufferCurrentMod = { bg = c.bg, fg = c.warning },
BufferCurrentSign = { bg = c.bg, fg = c.bg },
BufferCurrentTarget = { bg = c.bg, fg = c.red },
BufferAlternate = { bg = c.base01, fg = c.fg },
BufferAlternateERROR = { bg = c.base01, fg = c.error },
BufferAlternateHINT = { bg = c.base01, fg = c.hint },
BufferAlternateIndex = { bg = c.base01, fg = c.info },
BufferAlternateINFO = { bg = c.base01, fg = c.info },
BufferAlternateMod = { bg = c.base01, fg = c.warning },
BufferAlternateSign = { bg = c.base01, fg = c.info },
BufferAlternateTarget = { bg = c.base01, fg = c.red },
BufferAlternateWARN = { bg = c.base01, fg = c.warning },
BufferVisible = { bg = c.bg_statusline, fg = c.fg },
BufferVisibleERROR = { bg = c.bg_statusline, fg = c.error },
BufferVisibleHINT = { bg = c.bg_statusline, fg = c.hint },
BufferVisibleINFO = { bg = c.bg_statusline, fg = c.info },
BufferVisibleWARN = { bg = c.bg_statusline, fg = c.warning },
BufferVisibleIndex = { bg = c.bg_statusline, fg = c.info },
BufferVisibleMod = { bg = c.bg_statusline, fg = c.warning },
BufferVisibleSign = { bg = c.bg_statusline, fg = c.info },
BufferVisibleTarget = { bg = c.bg_statusline, fg = c.red },
BufferInactive = { bg = c.bg, fg = c.violet600 },
BufferInactiveERROR = { bg = c.bg, fg = c.red600 },
BufferInactiveHINT = { bg = c.bg, fg = c.cyan600 },
BufferInactiveINFO = { bg = c.bg, fg = c.blue600 },
BufferInactiveWARN = { bg = c.bg, fg = c.yellow600 },
BufferInactiveIndex = { bg = c.bg, fg = c.violet500 },
BufferInactiveMod = { bg = c.bg, fg = c.yellow600 },
BufferInactiveSign = { bg = c.bg, fg = c.bg },
BufferInactiveTarget = { bg = c.bg, fg = c.red },
BufferOffset = { bg = c.bg_statusline, fg = c.violet500 },
BufferTabpageFill = { bg = c.bg_highlight, fg = c.violet500 },
BufferTabpages = { bg = c.bg_statusline, fg = c.none },
}
end
return M