fix: name black and white to less confusing fg & bg

This commit is contained in:
Barrett Ruth 2026-01-27 18:24:57 -05:00
parent d31a1b322d
commit c38e0bac50
2 changed files with 34 additions and 34 deletions

View file

@ -1,7 +1,7 @@
local M = {} local M = {}
---@class Palette ---@class Palette
---@field black string ---@field foreground string
---@field red string ---@field red string
---@field green string ---@field green string
---@field yellow string ---@field yellow string
@ -9,7 +9,7 @@ local M = {}
---@field magenta string ---@field magenta string
---@field cyan string ---@field cyan string
---@field orange? string ---@field orange? string
---@field white string ---@field background string
---@field bright_black string ---@field bright_black string
---@field bright_red string ---@field bright_red string
---@field bright_green string ---@field bright_green string
@ -34,7 +34,7 @@ local M = {}
---@type Palette ---@type Palette
M.midnight = { M.midnight = {
black = '#121212', foreground = '#121212',
red = '#ff6b6b', red = '#ff6b6b',
green = '#98c379', green = '#98c379',
yellow = '#e5c07b', yellow = '#e5c07b',
@ -42,7 +42,7 @@ M.midnight = {
magenta = '#c678dd', magenta = '#c678dd',
cyan = '#56b6c2', cyan = '#56b6c2',
orange = '#e5a56b', orange = '#e5a56b',
white = '#e0e0e0', background = '#e0e0e0',
bright_black = '#666666', bright_black = '#666666',
bright_red = '#f48771', bright_red = '#f48771',
@ -63,7 +63,7 @@ M.midnight = {
---@type Palette ---@type Palette
M.daylight = { M.daylight = {
black = '#f5f5f5', foreground = '#f5f5f5',
red = '#c7254e', red = '#c7254e',
green = '#2d7f3e', green = '#2d7f3e',
yellow = '#996800', yellow = '#996800',
@ -71,7 +71,7 @@ M.daylight = {
magenta = '#ae3ec9', magenta = '#ae3ec9',
cyan = '#1098ad', cyan = '#1098ad',
orange = '#d9730d', orange = '#d9730d',
white = '#1a1a1a', background = '#1a1a1a',
bright_black = '#999999', bright_black = '#999999',
bright_red = '#e03e52', bright_red = '#e03e52',

View file

@ -59,7 +59,7 @@ function M.apply()
hi( hi(
'Normal', 'Normal',
{ fg = cs.white, bg = cs.black }, { fg = cs.background, bg = cs.foreground },
{ 'Identifier', 'Special', 'StatusLine', 'StatusLineNC', 'Winbar', 'WinbarNC' } { 'Identifier', 'Special', 'StatusLine', 'StatusLineNC', 'Winbar', 'WinbarNC' }
) )
hi('NonText', { fg = cs.grey }, { 'SpecialKey' }) hi('NonText', { fg = cs.grey }, { 'SpecialKey' })
@ -68,13 +68,13 @@ function M.apply()
hi('CursorLine', { bg = cs.dark_grey }, { 'ColorColumn', 'Folded', 'Visual' }) hi('CursorLine', { bg = cs.dark_grey }, { 'ColorColumn', 'Folded', 'Visual' })
hi('CursorLineNr', { fg = cs.medium_emphasis }) hi('CursorLineNr', { fg = cs.medium_emphasis })
hi('Conceal', { fg = cs.light_black, bg = cs.black }) hi('Conceal', { fg = cs.light_black, bg = cs.foreground })
hi('Directory', { fg = cs.blue }) hi('Directory', { fg = cs.blue })
hi('Error', { fg = cs.red }) hi('Error', { fg = cs.red })
hi('ErrorMsg', { bold = true, underline = true, fg = cs.red }) hi('ErrorMsg', { bold = true, underline = true, fg = cs.red })
hi('MoreMsg', { fg = cs.yellow }, { 'WarningMsg' }) hi('MoreMsg', { fg = cs.yellow }, { 'WarningMsg' })
hi('MatchParen', { bg = cs.med_grey }) hi('MatchParen', { bg = cs.med_grey })
hi('NormalFloat', { bg = cs.black }, { hi('NormalFloat', { bg = cs.foreground }, {
'LspInfoBorder', 'LspInfoBorder',
'FloatBorder', 'FloatBorder',
'FloatShadow', 'FloatShadow',
@ -87,32 +87,32 @@ function M.apply()
tshi('Comment', { fg = cs.light_black }) tshi('Comment', { fg = cs.light_black })
tshi('Constant', { fg = cs.green }) tshi('Constant', { fg = cs.green })
tshi('Define', { fg = cs.blue }) tshi('Define', { fg = cs.blue })
tshi('Function', { fg = cs.white }, { '@function.builtin', '@function.macro' }) tshi('Function', { fg = cs.background }, { '@function.builtin', '@function.macro' })
tshi('Include', { fg = cs.blue }) tshi('Include', { fg = cs.blue })
tshi('Keyword', { fg = cs.blue }, { 'Statement' }) tshi('Keyword', { fg = cs.blue }, { 'Statement' })
tshi('Namespace', { fg = cs.white }) tshi('Namespace', { fg = cs.background })
tshi('Number', { fg = cs.green }) tshi('Number', { fg = cs.green })
tshi('Operator', { fg = cs.white }, { '@keyword.operator', '@conditional.ternary' }) tshi('Operator', { fg = cs.background }, { '@keyword.operator', '@conditional.ternary' })
hi('Delimiter', { none = true }) hi('Delimiter', { none = true })
hi('@punctuation.delimiter', { fg = cs.white }) hi('@punctuation.delimiter', { fg = cs.background })
tshi('PreProc', { fg = cs.blue }) tshi('PreProc', { fg = cs.blue })
tshi('String', { fg = cs.green }, { '@character' }) tshi('String', { fg = cs.green }, { '@character' })
hi('@string.escape', { fg = cs.green }) hi('@string.escape', { fg = cs.green })
tshi('Title', { bold = true, fg = cs.white }) tshi('Title', { bold = true, fg = cs.background })
hi('@tag', { fg = cs.white }) hi('@tag', { fg = cs.background })
hi('@tag.attribute', { fg = cs.white }) hi('@tag.attribute', { fg = cs.background })
hi('@tag.delimiter', { fg = cs.white }) hi('@tag.delimiter', { fg = cs.background })
tshi('Type', { fg = cs.white }) tshi('Type', { fg = cs.background })
hi('@type.qualifier', { fg = cs.white }, { '@storageclass' }) hi('@type.qualifier', { fg = cs.background }, { '@storageclass' })
hi('@lsp.type.enum', { fg = cs.white }, { '@lsp.type.class' }) hi('@lsp.type.enum', { fg = cs.background }, { '@lsp.type.class' })
hi('@lsp.type.comment', { none = true }, { '@lsp.type.macro' }) hi('@lsp.type.comment', { none = true }, { '@lsp.type.macro' })
hi('@text.emphasis', { italic = true }) hi('@text.emphasis', { italic = true })
hi('@text.strong', { bold = true }) hi('@text.strong', { bold = true })
hi('@text.underline', { underline = true }) hi('@text.underline', { underline = true })
hi('@text.uri', { fg = cs.white, underline = true }, { '@text.reference' }) hi('@text.uri', { fg = cs.background, underline = true }, { '@text.reference' })
hi('@comment.danger', { fg = cs.red, bold = true, italic = true }) hi('@comment.danger', { fg = cs.red, bold = true, italic = true })
hi('@comment.note', { fg = cs.blue, bold = true, italic = true }) hi('@comment.note', { fg = cs.blue, bold = true, italic = true })
@ -139,18 +139,18 @@ function M.apply()
hi('DiagnosticUnderlineInfo', { undercurl = true, special = cs.light_black }) hi('DiagnosticUnderlineInfo', { undercurl = true, special = cs.light_black })
hi('SpellBad', { underline = true, special = cs.red }) hi('SpellBad', { underline = true, special = cs.red })
hi('SpellRare', { underline = true, special = cs.white }) hi('SpellRare', { underline = true, special = cs.background })
hi('SpellCap', { underline = true, special = cs.white }) hi('SpellCap', { underline = true, special = cs.background })
hi('SpellLocal', { underline = true, special = cs.white }) hi('SpellLocal', { underline = true, special = cs.background })
hi('gitCommitSummary', { fg = cs.white }) hi('gitCommitSummary', { fg = cs.background })
hi('@attribute.diff', { fg = cs.white }) hi('@attribute.diff', { fg = cs.background })
hi('DiffAdd', { fg = cs.green }, { '@text.diff.add', 'diffAdded' }) hi('DiffAdd', { fg = cs.green }, { '@text.diff.add', 'diffAdded' })
hi('DiffDelete', { fg = cs.red }, { '@text.diff.delete', 'diffRemoved' }) hi('DiffDelete', { fg = cs.red }, { '@text.diff.delete', 'diffRemoved' })
hi('DiffChange', { fg = cs.yellow }) hi('DiffChange', { fg = cs.yellow })
hi('@constructor.lua', { fg = cs.white }) hi('@constructor.lua', { fg = cs.background })
hi('@markup.heading.gitcommit', { none = true }) hi('@markup.heading.gitcommit', { none = true })
hi('GitSignsCurrentLineBlame', { italic = true, fg = cs.light_black }) hi('GitSignsCurrentLineBlame', { italic = true, fg = cs.light_black })
@ -162,9 +162,9 @@ function M.apply()
link('Pmenu', 'CmpPmenu') link('Pmenu', 'CmpPmenu')
link('PmenuSel', 'CmpPmenuSel') link('PmenuSel', 'CmpPmenuSel')
hi('CmpItemAbbr', { fg = cs.white }) hi('CmpItemAbbr', { fg = cs.background })
hi('CmpItemAbbrMatch', { fg = cs.white, bold = true }) hi('CmpItemAbbrMatch', { fg = cs.background, bold = true })
hi('CmpItemAbbrMatchFuzzy', { fg = cs.white, bold = true }) hi('CmpItemAbbrMatchFuzzy', { fg = cs.background, bold = true })
hi('CmpItemAbbrDeprecated', { fg = cs.light_black, strikethrough = true }) hi('CmpItemAbbrDeprecated', { fg = cs.light_black, strikethrough = true })
hi('CmpItemMenu', { fg = cs.light_black }) hi('CmpItemMenu', { fg = cs.light_black })
@ -215,18 +215,18 @@ function M.apply()
link('Directory', 'OilDir') link('Directory', 'OilDir')
link('NormalFloat', 'FzfLuaBorder') link('NormalFloat', 'FzfLuaBorder')
hi('FzfLuaHeaderText', { fg = cs.white }, { 'FzfLuaBufFlagCur' }) hi('FzfLuaHeaderText', { fg = cs.background }, { 'FzfLuaBufFlagCur' })
hi('FzfLuaBufFlagAlt', { fg = cs.white }) hi('FzfLuaBufFlagAlt', { fg = cs.background })
link('Normal', 'FzfLuaLivePrompt') link('Normal', 'FzfLuaLivePrompt')
vim.g.terminal_color_0 = cs.black vim.g.terminal_color_0 = cs.foreground
vim.g.terminal_color_1 = cs.red vim.g.terminal_color_1 = cs.red
vim.g.terminal_color_2 = cs.green vim.g.terminal_color_2 = cs.green
vim.g.terminal_color_3 = cs.yellow vim.g.terminal_color_3 = cs.yellow
vim.g.terminal_color_4 = cs.blue vim.g.terminal_color_4 = cs.blue
vim.g.terminal_color_5 = cs.magenta vim.g.terminal_color_5 = cs.magenta
vim.g.terminal_color_6 = cs.cyan vim.g.terminal_color_6 = cs.cyan
vim.g.terminal_color_7 = cs.white vim.g.terminal_color_7 = cs.background
vim.g.terminal_color_8 = cs.bright_black vim.g.terminal_color_8 = cs.bright_black
vim.g.terminal_color_9 = cs.bright_red vim.g.terminal_color_9 = cs.bright_red
vim.g.terminal_color_10 = cs.bright_green vim.g.terminal_color_10 = cs.bright_green