wip - add color definitions/links

This commit is contained in:
Ray Elliott 2021-09-06 15:33:01 +01:00
parent cd13880d2c
commit 51a4eee4b3
1 changed files with 141 additions and 98 deletions

View File

@ -81,19 +81,8 @@ vim.g.colors_name = 'paper-tonic'
NOTE: |Replace-mode| will probably be useful here. NOTE: |Replace-mode| will probably be useful here.
]] ]]
local black = {'#202020', 0, 'black'}
local gray = {'#808080', 244, 'gray'}
local gray_dark = {'#353535', 236, 'darkgrey'}
local gray_darker = {'#505050', 244, 'gray'}
local gray_light = {'#c0c0c0', 251, 'gray'}
local white = {'#ffffff', 15, 'white'}
local tan = {'#f4c069', 180, 'darkyellow'} local tan = {'#f4c069', 180, 'darkyellow'}
local red = {'#ee4a59', 196, 'red'}
local red_dark = {'#a80000', 124, 'darkred'}
local red_light = {'#ff4090', 203, 'red'}
local orange = {'#ff8900', 208, 'darkyellow'} local orange = {'#ff8900', 208, 'darkyellow'}
local orange_light = {'#f0af00', 214, 'yellow'} local orange_light = {'#f0af00', 214, 'yellow'}
@ -116,6 +105,54 @@ local pink_light = {'#ffb7b7', 38, 'white'}
local purple = {'#cf55f0', 129, 'magenta'} local purple = {'#cf55f0', 129, 'magenta'}
local purple_light = {'#af60af', 63, 'magenta'} local purple_light = {'#af60af', 63, 'magenta'}
local c_bg_darkest = {'#505050', 244, 'gray'}
local c_bg = {'#ffffff', 255, 'white'}
local c_bg_ui = {'#efefef', 0, 'darkgray'}
local c_bg_error = {'#ffd7d7', 196, 'white'}
local c_bg_hl_strong = {"#dddddd", 17, "white"}
local c_bg_hl = {"#eeeeee", 250, "white"}
local c_bg_hl_weak = {"#f7f2f2", 250, "white"}
local c_bg_hl_special_strong = {"#a3e0ff", 17, "cyan"}
local c_bg_hl_special = {"#beced5", 250, "cyan"}
local c_bg_hl_special_weak = {"#dce5ed", 250, "cyan"}
local c_fg_strongest = {'#555555', 236, 'darkgrey'}
local c_fg_strong = {'#777777', 236, 'darkgrey'}
local c_fg = {'#8c8c8c', 244, 'gray'}
local c_fg_weak = {'#9d9d9d', 251, 'gray'}
local c_fg_weakest = {'#bbbbbb', 251, 'gray'}
local c_fg_exception = {'#7c4444', 251, 'gray'}
local c_alert_strong = {'#d70000', 124, 'darkred'}
local c_alert = {'#d75f00', 196, 'red'}
-- TODO try #000000
local c_alert_weak = {'#d7a100', 203, 'red'}
local c_primary_strong = { "#5a4444", 236, "black" }
local c_primary = { "#6b5555", 244, "gray" }
local c_primary_weak = { "#7c6666", 248, "darkgray" }
local c_2_weak = {"#5e955e", 28, "darkgreen"}
local c_2 = {"#008700", 22, "darkgreen"}
local c_2_strong = {"#005a00", 22, "darkgreen"}
local c_3_weak = {"#2d78b7", 20, "blue"}
local c_3 = {"#005faf", 19, "blue"}
local c_3_strong = {"#004f92", 17, "darkblue"}
local c_4_weak = {"#78b7d5", 20, "blue"}
local c_4 = {"#56acd7", 19, "blue"}
local c_4_strong = {"#1596d7", 17, "darkblue"}
local c_5_weak = {"#e846ac", 164, "magenta"}
local c_5 = {"#d70087", 164, "magenta"}
local c_5_strong = {"#ad006d", 164, "magenta"}
--[[ Step 4: highlights --[[ Step 4: highlights
You can define highlight groups like this: You can define highlight groups like this:
@ -235,118 +272,118 @@ local NONE = {}
--[[ These are the ones you should edit. ]] --[[ These are the ones you should edit. ]]
-- This is the only highlight that must be defined separately. -- This is the only highlight that must be defined separately.
local highlight_group_normal = {fg=gray_light, bg=black} local highlight_group_normal = {fg=c_fg, bg=c_bg}
-- This is where the rest of your highlights should go. -- This is where the rest of your highlights should go.
local highlight_groups = { local highlight_groups = {
--[[ 4.1. Text Analysis ]] --[[ 4.1. Text Analysis ]]
Comment = {fg=gray, style='italic'}, Comment = {fg=c_fg_weakest, style='italic'},
NonText = {fg=gray_darker}, NonText = {fg=c_fg_weak},
EndOfBuffer = 'NonText', EndOfBuffer = 'Comment',
Whitespace = 'NonText', Whitespace = 'NonText',
--[[ 4.1.1. Literals]] --[[ 4.1.1. Literals]]
Constant = {fg=orange_light}, Constant = {fg=c_fg_strong, style='italic'},
String = {fg=green_dark}, String = {fg=fg_strong, style='italic'},
Character = {fg=red_light}, Character = 'String',
Number = {fg=pink_light}, Number = 'String',
Boolean = {fg=yellow}, Boolean = 'String',
Float = 'Number', Float = 'Number',
--[[ 4.1.2. Identifiers]] --[[ 4.1.2. Identifiers]]
Identifier = {fg=FG}, Identifier = {fg=c_primary, style='bold'},
Function = {fg=purple}, Function = {fg=c_primary},
--[[ 4.1.3. Syntax]] --[[ 4.1.3. Syntax]]
Statement = {fg=ice}, Statement = {fg=fg},
Conditional = {fg=ice, style='italic'}, Conditional = {fg=fg, style='bold'},
Repeat = {fg=turqoise, style='italic'}, Repeat = 'Conditional',
Label = {fg=pink, style='bold'}, Label = {fg=c_fg_strongest, style='bold'},
Operator = {fg=green, style='bold'}, Operator = {fg=fg_weak},
Keyword = {fg=teal}, Keyword = {fg=fg_strong, style='bold'},
Exception = {fg=red_light, style='bold'}, Exception = {fg=c_fg_exception, style='bold'},
Noise = 'Delimiter', Noise = {fg=c_fg_weakest},
--[[ 4.1.4. Metatextual Information]] --[[ 4.1.4. Metatextual Information]]
PreProc = {fg=tan}, PreProc = {fg=c_fg_weak},
Include = {fg=green_light, style='nocombine'}, Include = {fg=c_fg_weak, style='bold'},
Define = {fg=blue, style='nocombine'}, Define = 'Include',
Macro = {fg=blue, style='italic'}, Macro = {fg=c_fg, style='bold'},
PreCondit = {fg=tan, style='italic'}, PreCondit = 'Macro',
--[[ 4.1.5. Semantics]] --[[ 4.1.5. Semantics]]
Type = {fg=cyan}, Type = {fg=c_fg_weak, style='bold'},
StorageClass = {fg=orange_light, style='bold'}, StorageClass = {fg=c_fg_weak},
Structure = {fg=blue, style='bold'}, Structure = 'StorageClass',
Typedef = {fg=cyan, style='italic'}, Typedef = 'StorageClass',
--[[ 4.1.6. Edge Cases]] --[[ 4.1.6. Edge Cases]]
Special = {fg=magenta, style='bold'}, Special = {fg=c_primary_strong, style='bold'},
SpecialChar = {fg=red_light, style='italic'}, SpecialChar = {fg=c_primary_strong},
SpecialKey = 'Character', SpecialKey = 'SpecialCharacter',
Tag = 'Underlined', Tag = {fg=c_primary_strong, style='bold'},
Delimiter = {fg=white}, Delimiter = 'Noise',
SpecialComment = {fg=gray, style={'bold', 'nocombine'}}, SpecialComment = {fg=c_fg_exception, style='bold'},
Debug = 'WarningMsg', Debug = 'WarningMsg',
--[[ 4.1.7. Help Syntax]] --[[ 4.1.7. Help Syntax]]
Underlined = {fg=turqoise, style='underline'}, Underlined = {style='underline'},
Ignore = {fg=gray}, Ignore = {fg=c_fg_weak},
Error = {fg=white, bg=red_dark, style='bold'}, Error = {fg=c_alert_strong, style='bold'},
Todo = {fg=yellow, style={'bold', 'underline'}}, Todo = {fg=c_alert_strong},
Hint = {fg=black, bg=magenta, style='bold'}, Hint = {fg=c_alert_weak, style='bold'},
Info = function(self) return {fg=self.Hint.fg, bg=pink_light, style=self.Hint.style} end, Info = {fg=c_alert_weak},
Warning = function(self) return {fg=self.Hint.fg, bg=orange, style=self.Hint.style} end, Warning = {fg=c_alert},
--[[ 4.2... Editor UI ]] --[[ 4.2... Editor UI ]]
--[[ 4.2.1. Status Line]] --[[ 4.2.1. Status Line]]
StatusLine = {fg=green_light, bg=gray_darker}, StatusLine = {fg=c_fg, bg=c_bg_ui, style='italic'},
StatusLineNC = function(self) return {fg=gray, bg=self.StatusLine.bg} end, StatusLineNC = {fg=c_fg_weakest, bg=c_bg_ui, style='italic'},
StatusLineTerm = 'StatusLine', StatusLineTerm = 'StatusLine',
StatusLineTermNC = 'StatusLineNC', StatusLineTermNC = 'StatusLineNC',
--[[ 4.2.2. Separators]] --[[ 4.2.2. Separators]]
VertSplit = {fg=white}, VertSplit = {fg=c_bg_hl_strong},
TabLine = {fg=FG, bg=gray_darker}, TabLine = 'StatusLineNC',
TabLineFill = {fg=gray_darker, bg=black}, TabLineFill = {fg=c_bg_ui, bg=c_bg_ui},
TabLineSel = {fg=FG, bg=BG}, TabLineSel = 'StatusLine',
Title = {style='bold'}, Title = {style='bold'},
--[[ 4.2.3. Conditional Line Highlighting]] --[[ 4.2.3. Conditional Line Highlighting]]
Conceal = 'NonText', Conceal = 'Noise',
CursorLine = {bg=gray_dark}, CursorLine = {bg=c_bg_hl},
CursorLineNr = function(self) return {fg=pink, bg=self.LineNr.bg} end, CursorLineNr = {fg=c_fg_weak, style='bold'},
debugBreakpoint = 'ErrorMsg', debugBreakpoint = 'ErrorMsg',
debugPC = 'ColorColumn', debugPC = 'ColorColumn',
LineNr = {fg=gray}, LineNr = {fg=c_fg_weak},
QuickFixLine = {bg=gray_darker}, QuickFixLine = {bg=c_bg_hl_special_weak, style='bold'},
Visual = {style='inverse'}, Visual = {bg=c_bg_hl_special},
VisualNOS = {bg=gray_darker}, VisualNOS = {bg=c_bg_hl_special, fg=c_fg_strong, style='bold'},
--[[ 4.2.4. Popup Menu]] --[[ 4.2.4. Popup Menu]]
Pmenu = {fg=FG, bg=gray_dark}, Pmenu = {fg=c_fg, bg=c_bg_ui},
PmenuSbar = {bg=gray_darker}, PmenuSbar = 'Pmenu',
PmenuSel = {fg=black, bg=gray_light}, PmenuSel = {fg=c_fg_strong, bg=c_bg_ui, style='bold'},
PmenuThumb = {bg=white}, PmenuThumb = 'Pmenu',
WildMenu = 'PmenuSel', WildMenu = {fg=c_fg_strong, bg=c_bg_ui, style='bold'},
--[[ 4.2.5. Folds]] --[[ 4.2.5. Folds]]
FoldColumn = {bg=gray_darker, style='bold'}, FoldColumn = {fg=c_fg_weak},
Folded = {fg=black, bg=purple_light, style='italic'}, Folded = {fg=c_fg_strong, style='bold'},
--[[ 4.2.6. Diffs]] --[[ 4.2.6. Diffs]]
DiffAdd = {fg=black, bg=green_dark}, DiffAdd = {fg=c_bg, bg=green_dark},
DiffChange = NONE, DiffChange = NONE,
DiffDelete = function(self) return {fg=self.DiffAdd.fg, bg=red} end, DiffDelete = function(self) return {fg=self.DiffAdd.fg, bg=c_alert} end,
DiffText = function(self) return {fg=self.DiffAdd.fg, bg=yellow} end, DiffText = function(self) return {fg=self.DiffAdd.fg, bg=yellow} end,
--[[ 4.2.7. Searching]] --[[ 4.2.7. Searching]]
IncSearch = {style='inverse'}, IncSearch = {style='inverse'},
MatchParen = {fg=green, style={'bold', 'underline'}}, MatchParen = {fg=green, style={'bold', 'underline'}},
Search = {style={'underline', color=white}}, Search = {style={'underline', color=c_fg_strongest}},
--[[ 4.2.8. Spelling]] --[[ 4.2.8. Spelling]]
SpellBad = {style={'undercurl', color=red}}, SpellBad = {style={'undercurl', color=c_alert}},
SpellCap = {style={'undercurl', color=yellow}}, SpellCap = {style={'undercurl', color=yellow}},
SpellLocal = {style={'undercurl', color=green}}, SpellLocal = {style={'undercurl', color=green}},
SpellRare = {style={'undercurl', color=orange}}, SpellRare = {style={'undercurl', color=orange}},
@ -356,7 +393,7 @@ local highlight_groups = {
SignColumn = NONE, SignColumn = NONE,
--[[ 4.2.10. Messages]] --[[ 4.2.10. Messages]]
ErrorMsg = {fg=red, style='bold'}, ErrorMsg = {fg=c_alert, style='bold'},
HintMsg = {fg=magenta, style='italic'}, HintMsg = {fg=magenta, style='italic'},
InfoMsg = {fg=pink_light, style='italic'}, InfoMsg = {fg=pink_light, style='italic'},
ModeMsg = {fg=yellow}, ModeMsg = {fg=yellow},
@ -388,7 +425,7 @@ local highlight_groups = {
--[[ 4.2.12. Cursor ]] --[[ 4.2.12. Cursor ]]
Cursor = {style='inverse'}, Cursor = {style='inverse'},
CursorIM = 'Cursor', CursorIM = 'Cursor',
CursorColumn = {bg=gray_dark}, CursorColumn = {bg=c_fg_strong},
--[[ 4.2.13. Misc ]] --[[ 4.2.13. Misc ]]
Directory = {fg=ice, style='bold'}, Directory = {fg=ice, style='bold'},
@ -512,7 +549,7 @@ local highlight_groups = {
--[[ 4.3.8. HTML ]] --[[ 4.3.8. HTML ]]
htmlArg = 'Label', htmlArg = 'Label',
htmlBold = {fg=gray_light, style='bold'}, htmlBold = {fg=c_fg_weak, style='bold'},
htmlTitle = 'htmlBold', htmlTitle = 'htmlBold',
htmlEndTag = 'htmlTag', htmlEndTag = 'htmlTag',
htmlH1 = 'markdownH1', htmlH1 = 'markdownH1',
@ -575,7 +612,7 @@ local highlight_groups = {
--[[ 4.3.13. Markdown ]] --[[ 4.3.13. Markdown ]]
markdownCode = 'mkdCode', markdownCode = 'mkdCode',
markdownCodeDelimiter = 'mkdCodeDelimiter', markdownCodeDelimiter = 'mkdCodeDelimiter',
markdownH1 = {fg=red, style='bold'}, markdownH1 = {fg=c_alert, style='bold'},
markdownH2 = {fg=orange, style='bold'}, markdownH2 = {fg=orange, style='bold'},
markdownH3 = {fg=yellow, style='bold'}, markdownH3 = {fg=yellow, style='bold'},
markdownH4 = {fg=green_dark, style='bold'}, markdownH4 = {fg=green_dark, style='bold'},
@ -775,7 +812,7 @@ local highlight_groups = {
ALEWarningSign = 'WarningMsg', ALEWarningSign = 'WarningMsg',
--[[ 4.4.2. coc.nvim ]] --[[ 4.4.2. coc.nvim ]]
CocErrorHighlight = {style={'undercurl', color=red}}, CocErrorHighlight = {style={'undercurl', color=c_alert}},
CocHintHighlight = {style={'undercurl', color=magenta}}, CocHintHighlight = {style={'undercurl', color=magenta}},
CocInfoHighlight = {style={'undercurl', color=pink_light}}, CocInfoHighlight = {style={'undercurl', color=pink_light}},
CocWarningHighlight = {style={'undercurl', color=orange}}, CocWarningHighlight = {style={'undercurl', color=orange}},
@ -791,7 +828,7 @@ local highlight_groups = {
--[[ 4.4.4. vim-gitgutter / vim-signify ]] --[[ 4.4.4. vim-gitgutter / vim-signify ]]
GitGutterAdd = {fg = green}, GitGutterAdd = {fg = green},
GitGutterChange = {fg = yellow}, GitGutterChange = {fg = yellow},
GitGutterDelete = {fg = red}, GitGutterDelete = {fg = c_alert},
GitGutterChangeDelete = {fg=orange}, GitGutterChangeDelete = {fg=orange},
SignifySignAdd = 'GitGutterAdd', SignifySignAdd = 'GitGutterAdd',
@ -800,8 +837,8 @@ local highlight_groups = {
SignifySignChangeDelete = 'GitGutterChangeDelete', SignifySignChangeDelete = 'GitGutterChangeDelete',
--[[ 4.4.5. vim-indent-guides ]] --[[ 4.4.5. vim-indent-guides ]]
IndentGuidesOdd = {bg=gray_darker}, IndentGuidesOdd = {bg=c_bg_darkest},
IndentGuidesEven = {bg=gray}, IndentGuidesEven = {bg=c_fg},
--[[ 4.4.7. NERDTree ]] --[[ 4.4.7. NERDTree ]]
NERDTreeCWD = 'Label', NERDTreeCWD = 'Label',
@ -825,7 +862,7 @@ local highlight_groups = {
--[[ 4.4.9. barbar.nvim ]] --[[ 4.4.9. barbar.nvim ]]
BufferCurrent = 'TabLineSel', BufferCurrent = 'TabLineSel',
BufferCurrentIndex = function(self) return {fg=self.InfoMsg.fg, bg=self.BufferCurrent.bg} end, BufferCurrentIndex = function(self) return {fg=self.InfoMsg.fg, bg=self.BufferCurrent.bg} end,
BufferCurrentMod = {fg=tan, bg=black, style='bold'}, BufferCurrentMod = {fg=tan, bg=c_bg, style='bold'},
BufferCurrentSign = 'HintMsg', BufferCurrentSign = 'HintMsg',
BufferCurrentTarget = 'BufferCurrentSign', BufferCurrentTarget = 'BufferCurrentSign',
@ -840,7 +877,7 @@ local highlight_groups = {
BufferVisible = 'TabLine', BufferVisible = 'TabLine',
BufferVisibleIndex = function(self) return {fg=self.InfoMsg.fg, bg=self.BufferVisible.bg} end, BufferVisibleIndex = function(self) return {fg=self.InfoMsg.fg, bg=self.BufferVisible.bg} end,
BufferVisibleMod = {fg=white, bg=gray_darker, style='italic'}, BufferVisibleMod = {fg=white, bg=c_bg_darkest, style='italic'},
BufferVisibleSign = 'BufferVisible', BufferVisibleSign = 'BufferVisible',
BufferVisibleTarget = function(self) BufferVisibleTarget = function(self)
local super = self.BufferVisibleMod local super = self.BufferVisibleMod
@ -876,12 +913,12 @@ local highlight_groups = {
TodoFgTODO = function(_) return {fg=cyan, style='italic'} end, TodoFgTODO = function(_) return {fg=cyan, style='italic'} end,
TodoFgWARN = function(self) return {fg=self.WarningMsg.fg} end, TodoFgWARN = function(self) return {fg=self.WarningMsg.fg} end,
TodoBgFIX = function(self) return {fg=black, bg=self.ErrorMsg.fg, style={'bold', 'italic', 'nocombine'}} end, TodoBgFIX = function(self) return {fg=c_bg, bg=self.ErrorMsg.fg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgHACK = function(self) return {fg=black, bg=self.Todo.fg, style={'bold', 'italic', 'nocombine'}} end, TodoBgHACK = function(self) return {fg=c_bg, bg=self.Todo.fg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgNOTE = function(self) return {fg=black, bg=self.Hint.bg, style={'bold', 'italic', 'nocombine'}} end, TodoBgNOTE = function(self) return {fg=c_bg, bg=self.Hint.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgPERF = function(self) return {fg=black, bg=self.Info.bg, style={'bold', 'italic', 'nocombine'}} end, TodoBgPERF = function(self) return {fg=c_bg, bg=self.Info.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgTODO = function(_) return {fg=black, bg=cyan, style={'bold', 'italic', 'nocombine'}} end, TodoBgTODO = function(_) return {fg=c_bg, bg=cyan, style={'bold', 'italic', 'nocombine'}} end,
TodoBgWARN = function(self) return {fg=black, bg=self.Warning.bg, style={'bold', 'italic', 'nocombine'}} end, TodoBgWARN = function(self) return {fg=c_bg, bg=self.Warning.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoSignFIX = 'TodoFgFIX', TodoSignFIX = 'TodoFgFIX',
TodoSignHACK = 'TodoFgHACK', TodoSignHACK = 'TodoFgHACK',
@ -905,6 +942,12 @@ local highlight_groups = {
packerStatusFail = 'Statement', packerStatusFail = 'Statement',
packerStatusSuccess = 'packerStatusFail', packerStatusSuccess = 'packerStatusFail',
packerSuccess = function(self) return {fg=green, style=self.packerFail.style} end, packerSuccess = function(self) return {fg=green, style=self.packerFail.style} end,
-- [[ 5.0.1 custom ]]
TabLineFill = { fg=ui_bg, fg=ui_bg, style='italic' },
TabLineItem = { bg=ui_bg, fg=ui_fg, style='italic' },
TabLineItemSel = { bg=ui_bg, fg=ui_fg_strong, style='italic' },
} }
--[[ Step 5: Terminal Colors --[[ Step 5: Terminal Colors
@ -944,22 +987,22 @@ local highlight_groups = {
]] ]]
local terminal_colors = { local terminal_colors = {
[1] = black, [1] = c_bg,
[2] = red_dark, [2] = c_alert_strong,
[3] = green_dark, [3] = green_dark,
[4] = orange, [4] = orange,
[5] = blue, [5] = blue,
[6] = magenta_dark, [6] = magenta_dark,
[7] = teal, [7] = teal,
[8] = gray, [8] = c_fg,
[9] = gray_dark, [9] = c_fg_strong,
[10] = red, [10] = c_alert,
[11] = green, [11] = green,
[12] = yellow, [12] = yellow,
[13] = turqoise, [13] = turqoise,
[14] = purple, [14] = purple,
[15] = cyan, [15] = cyan,
[16] = gray_light [16] = c_fg_weak
} }
--[[ Step 5: Sourcing --[[ Step 5: Sourcing