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.
]]
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 red = {'#ee4a59', 196, 'red'}
local red_dark = {'#a80000', 124, 'darkred'}
local red_light = {'#ff4090', 203, 'red'}
local orange = {'#ff8900', 208, 'darkyellow'}
local orange_light = {'#f0af00', 214, 'yellow'}
@ -116,6 +105,54 @@ local pink_light = {'#ffb7b7', 38, 'white'}
local purple = {'#cf55f0', 129, '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
You can define highlight groups like this:
@ -235,118 +272,118 @@ local NONE = {}
--[[ These are the ones you should edit. ]]
-- 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.
local highlight_groups = {
--[[ 4.1. Text Analysis ]]
Comment = {fg=gray, style='italic'},
NonText = {fg=gray_darker},
EndOfBuffer = 'NonText',
Comment = {fg=c_fg_weakest, style='italic'},
NonText = {fg=c_fg_weak},
EndOfBuffer = 'Comment',
Whitespace = 'NonText',
--[[ 4.1.1. Literals]]
Constant = {fg=orange_light},
String = {fg=green_dark},
Character = {fg=red_light},
Number = {fg=pink_light},
Boolean = {fg=yellow},
Constant = {fg=c_fg_strong, style='italic'},
String = {fg=fg_strong, style='italic'},
Character = 'String',
Number = 'String',
Boolean = 'String',
Float = 'Number',
--[[ 4.1.2. Identifiers]]
Identifier = {fg=FG},
Function = {fg=purple},
Identifier = {fg=c_primary, style='bold'},
Function = {fg=c_primary},
--[[ 4.1.3. Syntax]]
Statement = {fg=ice},
Conditional = {fg=ice, style='italic'},
Repeat = {fg=turqoise, style='italic'},
Label = {fg=pink, style='bold'},
Operator = {fg=green, style='bold'},
Keyword = {fg=teal},
Exception = {fg=red_light, style='bold'},
Noise = 'Delimiter',
Statement = {fg=fg},
Conditional = {fg=fg, style='bold'},
Repeat = 'Conditional',
Label = {fg=c_fg_strongest, style='bold'},
Operator = {fg=fg_weak},
Keyword = {fg=fg_strong, style='bold'},
Exception = {fg=c_fg_exception, style='bold'},
Noise = {fg=c_fg_weakest},
--[[ 4.1.4. Metatextual Information]]
PreProc = {fg=tan},
Include = {fg=green_light, style='nocombine'},
Define = {fg=blue, style='nocombine'},
Macro = {fg=blue, style='italic'},
PreCondit = {fg=tan, style='italic'},
PreProc = {fg=c_fg_weak},
Include = {fg=c_fg_weak, style='bold'},
Define = 'Include',
Macro = {fg=c_fg, style='bold'},
PreCondit = 'Macro',
--[[ 4.1.5. Semantics]]
Type = {fg=cyan},
StorageClass = {fg=orange_light, style='bold'},
Structure = {fg=blue, style='bold'},
Typedef = {fg=cyan, style='italic'},
Type = {fg=c_fg_weak, style='bold'},
StorageClass = {fg=c_fg_weak},
Structure = 'StorageClass',
Typedef = 'StorageClass',
--[[ 4.1.6. Edge Cases]]
Special = {fg=magenta, style='bold'},
SpecialChar = {fg=red_light, style='italic'},
SpecialKey = 'Character',
Tag = 'Underlined',
Delimiter = {fg=white},
SpecialComment = {fg=gray, style={'bold', 'nocombine'}},
Special = {fg=c_primary_strong, style='bold'},
SpecialChar = {fg=c_primary_strong},
SpecialKey = 'SpecialCharacter',
Tag = {fg=c_primary_strong, style='bold'},
Delimiter = 'Noise',
SpecialComment = {fg=c_fg_exception, style='bold'},
Debug = 'WarningMsg',
--[[ 4.1.7. Help Syntax]]
Underlined = {fg=turqoise, style='underline'},
Ignore = {fg=gray},
Error = {fg=white, bg=red_dark, style='bold'},
Todo = {fg=yellow, style={'bold', 'underline'}},
Hint = {fg=black, bg=magenta, style='bold'},
Info = function(self) return {fg=self.Hint.fg, bg=pink_light, style=self.Hint.style} end,
Warning = function(self) return {fg=self.Hint.fg, bg=orange, style=self.Hint.style} end,
Underlined = {style='underline'},
Ignore = {fg=c_fg_weak},
Error = {fg=c_alert_strong, style='bold'},
Todo = {fg=c_alert_strong},
Hint = {fg=c_alert_weak, style='bold'},
Info = {fg=c_alert_weak},
Warning = {fg=c_alert},
--[[ 4.2... Editor UI ]]
--[[ 4.2.1. Status Line]]
StatusLine = {fg=green_light, bg=gray_darker},
StatusLineNC = function(self) return {fg=gray, bg=self.StatusLine.bg} end,
StatusLine = {fg=c_fg, bg=c_bg_ui, style='italic'},
StatusLineNC = {fg=c_fg_weakest, bg=c_bg_ui, style='italic'},
StatusLineTerm = 'StatusLine',
StatusLineTermNC = 'StatusLineNC',
--[[ 4.2.2. Separators]]
VertSplit = {fg=white},
TabLine = {fg=FG, bg=gray_darker},
TabLineFill = {fg=gray_darker, bg=black},
TabLineSel = {fg=FG, bg=BG},
VertSplit = {fg=c_bg_hl_strong},
TabLine = 'StatusLineNC',
TabLineFill = {fg=c_bg_ui, bg=c_bg_ui},
TabLineSel = 'StatusLine',
Title = {style='bold'},
--[[ 4.2.3. Conditional Line Highlighting]]
Conceal = 'NonText',
CursorLine = {bg=gray_dark},
CursorLineNr = function(self) return {fg=pink, bg=self.LineNr.bg} end,
Conceal = 'Noise',
CursorLine = {bg=c_bg_hl},
CursorLineNr = {fg=c_fg_weak, style='bold'},
debugBreakpoint = 'ErrorMsg',
debugPC = 'ColorColumn',
LineNr = {fg=gray},
QuickFixLine = {bg=gray_darker},
Visual = {style='inverse'},
VisualNOS = {bg=gray_darker},
LineNr = {fg=c_fg_weak},
QuickFixLine = {bg=c_bg_hl_special_weak, style='bold'},
Visual = {bg=c_bg_hl_special},
VisualNOS = {bg=c_bg_hl_special, fg=c_fg_strong, style='bold'},
--[[ 4.2.4. Popup Menu]]
Pmenu = {fg=FG, bg=gray_dark},
PmenuSbar = {bg=gray_darker},
PmenuSel = {fg=black, bg=gray_light},
PmenuThumb = {bg=white},
WildMenu = 'PmenuSel',
Pmenu = {fg=c_fg, bg=c_bg_ui},
PmenuSbar = 'Pmenu',
PmenuSel = {fg=c_fg_strong, bg=c_bg_ui, style='bold'},
PmenuThumb = 'Pmenu',
WildMenu = {fg=c_fg_strong, bg=c_bg_ui, style='bold'},
--[[ 4.2.5. Folds]]
FoldColumn = {bg=gray_darker, style='bold'},
Folded = {fg=black, bg=purple_light, style='italic'},
FoldColumn = {fg=c_fg_weak},
Folded = {fg=c_fg_strong, style='bold'},
--[[ 4.2.6. Diffs]]
DiffAdd = {fg=black, bg=green_dark},
DiffAdd = {fg=c_bg, bg=green_dark},
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,
--[[ 4.2.7. Searching]]
IncSearch = {style='inverse'},
MatchParen = {fg=green, style={'bold', 'underline'}},
Search = {style={'underline', color=white}},
Search = {style={'underline', color=c_fg_strongest}},
--[[ 4.2.8. Spelling]]
SpellBad = {style={'undercurl', color=red}},
SpellBad = {style={'undercurl', color=c_alert}},
SpellCap = {style={'undercurl', color=yellow}},
SpellLocal = {style={'undercurl', color=green}},
SpellRare = {style={'undercurl', color=orange}},
@ -356,7 +393,7 @@ local highlight_groups = {
SignColumn = NONE,
--[[ 4.2.10. Messages]]
ErrorMsg = {fg=red, style='bold'},
ErrorMsg = {fg=c_alert, style='bold'},
HintMsg = {fg=magenta, style='italic'},
InfoMsg = {fg=pink_light, style='italic'},
ModeMsg = {fg=yellow},
@ -388,7 +425,7 @@ local highlight_groups = {
--[[ 4.2.12. Cursor ]]
Cursor = {style='inverse'},
CursorIM = 'Cursor',
CursorColumn = {bg=gray_dark},
CursorColumn = {bg=c_fg_strong},
--[[ 4.2.13. Misc ]]
Directory = {fg=ice, style='bold'},
@ -512,7 +549,7 @@ local highlight_groups = {
--[[ 4.3.8. HTML ]]
htmlArg = 'Label',
htmlBold = {fg=gray_light, style='bold'},
htmlBold = {fg=c_fg_weak, style='bold'},
htmlTitle = 'htmlBold',
htmlEndTag = 'htmlTag',
htmlH1 = 'markdownH1',
@ -575,7 +612,7 @@ local highlight_groups = {
--[[ 4.3.13. Markdown ]]
markdownCode = 'mkdCode',
markdownCodeDelimiter = 'mkdCodeDelimiter',
markdownH1 = {fg=red, style='bold'},
markdownH1 = {fg=c_alert, style='bold'},
markdownH2 = {fg=orange, style='bold'},
markdownH3 = {fg=yellow, style='bold'},
markdownH4 = {fg=green_dark, style='bold'},
@ -775,7 +812,7 @@ local highlight_groups = {
ALEWarningSign = 'WarningMsg',
--[[ 4.4.2. coc.nvim ]]
CocErrorHighlight = {style={'undercurl', color=red}},
CocErrorHighlight = {style={'undercurl', color=c_alert}},
CocHintHighlight = {style={'undercurl', color=magenta}},
CocInfoHighlight = {style={'undercurl', color=pink_light}},
CocWarningHighlight = {style={'undercurl', color=orange}},
@ -791,7 +828,7 @@ local highlight_groups = {
--[[ 4.4.4. vim-gitgutter / vim-signify ]]
GitGutterAdd = {fg = green},
GitGutterChange = {fg = yellow},
GitGutterDelete = {fg = red},
GitGutterDelete = {fg = c_alert},
GitGutterChangeDelete = {fg=orange},
SignifySignAdd = 'GitGutterAdd',
@ -800,8 +837,8 @@ local highlight_groups = {
SignifySignChangeDelete = 'GitGutterChangeDelete',
--[[ 4.4.5. vim-indent-guides ]]
IndentGuidesOdd = {bg=gray_darker},
IndentGuidesEven = {bg=gray},
IndentGuidesOdd = {bg=c_bg_darkest},
IndentGuidesEven = {bg=c_fg},
--[[ 4.4.7. NERDTree ]]
NERDTreeCWD = 'Label',
@ -825,7 +862,7 @@ local highlight_groups = {
--[[ 4.4.9. barbar.nvim ]]
BufferCurrent = 'TabLineSel',
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',
BufferCurrentTarget = 'BufferCurrentSign',
@ -840,7 +877,7 @@ local highlight_groups = {
BufferVisible = 'TabLine',
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',
BufferVisibleTarget = function(self)
local super = self.BufferVisibleMod
@ -876,12 +913,12 @@ local highlight_groups = {
TodoFgTODO = function(_) return {fg=cyan, style='italic'} 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,
TodoBgHACK = function(self) return {fg=black, bg=self.Todo.fg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgNOTE = function(self) return {fg=black, bg=self.Hint.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgPERF = function(self) return {fg=black, bg=self.Info.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgTODO = function(_) return {fg=black, bg=cyan, style={'bold', 'italic', 'nocombine'}} end,
TodoBgWARN = function(self) return {fg=black, bg=self.Warning.bg, 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=c_bg, bg=self.Todo.fg, 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=c_bg, bg=self.Info.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoBgTODO = function(_) return {fg=c_bg, bg=cyan, style={'bold', 'italic', 'nocombine'}} end,
TodoBgWARN = function(self) return {fg=c_bg, bg=self.Warning.bg, style={'bold', 'italic', 'nocombine'}} end,
TodoSignFIX = 'TodoFgFIX',
TodoSignHACK = 'TodoFgHACK',
@ -905,6 +942,12 @@ local highlight_groups = {
packerStatusFail = 'Statement',
packerStatusSuccess = 'packerStatusFail',
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
@ -944,22 +987,22 @@ local highlight_groups = {
]]
local terminal_colors = {
[1] = black,
[2] = red_dark,
[1] = c_bg,
[2] = c_alert_strong,
[3] = green_dark,
[4] = orange,
[5] = blue,
[6] = magenta_dark,
[7] = teal,
[8] = gray,
[9] = gray_dark,
[10] = red,
[8] = c_fg,
[9] = c_fg_strong,
[10] = c_alert,
[11] = green,
[12] = yellow,
[13] = turqoise,
[14] = purple,
[15] = cyan,
[16] = gray_light
[16] = c_fg_weak
}
--[[ Step 5: Sourcing