From 0006161c82be6da0acf42c0cb0131695726cc965 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 7 Sep 2021 12:18:46 +0100 Subject: [PATCH] define colors --- colors/paper-tonic.lua | 139 ++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 77 deletions(-) diff --git a/colors/paper-tonic.lua b/colors/paper-tonic.lua index 96aedec..d705eb6 100644 --- a/colors/paper-tonic.lua +++ b/colors/paper-tonic.lua @@ -81,36 +81,21 @@ vim.g.colors_name = 'paper-tonic' NOTE: |Replace-mode| will probably be useful here. ]] -local tan = {'#f4c069', 180, 'darkyellow'} - -local orange = {'#ff8900', 208, 'darkyellow'} -local orange_light = {'#f0af00', 214, 'yellow'} - -local yellow = {'#f0df33', 220, 'yellow'} - -local green_dark = {'#70d533', 83, 'darkgreen'} -local green = {'#22ff22', 72, 'green'} -local green_light = {'#99ff99', 72, 'green'} -local turqoise = {'#2bff99', 33, 'green'} - -local blue = {'#7766ff', 63, 'blue'} -local cyan = {'#33dbc3', 87, 'cyan'} -local ice = {'#95c5ff', 63, 'cyan'} -local teal = {'#60afff', 38, 'darkblue'} - -local magenta = {'#d5508f', 126, 'magenta'} -local magenta_dark = {'#bb0099', 126, 'darkmagenta'} -local pink = {'#ffa6ff', 162, 'magenta'} -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_error = {'#ffd7d7', 196, 'white'} +local c_bg_error_weak = {'#ffefef', 196, 'white'} + +local c_add = {'#89af89', 196, 'white'} +local c_change = {'#8989af', 196, 'white'} +local c_delete = {'#af8989', 196, 'white'} + +local c_bg_diff_add = {'#e0ece0', 196, 'white'} +local c_bg_diff_change = {'#e0e0ec', 196, 'white'} +local c_bg_diff_delete = {'#ece0e0', 196, 'white'} local c_bg_hl_strong = {"#dddddd", 17, "white"} local c_bg_hl = {"#eeeeee", 250, "white"} @@ -120,8 +105,8 @@ 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_strongest = {'#444444', 236, 'darkgrey'} +local c_fg_strong = {'#666666', 236, 'darkgrey'} local c_fg = {'#8c8c8c', 244, 'gray'} local c_fg_weak = {'#9d9d9d', 251, 'gray'} local c_fg_weakest = {'#bbbbbb', 251, 'gray'} @@ -130,9 +115,11 @@ 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_question = {'#000000', 0, 'black'} + +local c_primary_strongest = { "#7f4b4b", 236, "black" } local c_primary_strong = { "#5a4444", 236, "black" } local c_primary = { "#6b5555", 244, "gray" } local c_primary_weak = { "#7c6666", 248, "darkgray" } @@ -318,8 +305,8 @@ local highlight_groups = { Typedef = 'StorageClass', --[[ 4.1.6. Edge Cases]] - Special = {fg=c_primary_strong, style='bold'}, - SpecialChar = {fg=c_primary_strong}, + Special = {fg=c_primary_strongest, style='bold'}, + SpecialChar = {fg=c_primary_strongest}, SpecialKey = 'SpecialCharacter', Tag = {fg=c_primary_strong, style='bold'}, Delimiter = 'Noise', @@ -331,8 +318,8 @@ local highlight_groups = { 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}, + Hint = {fg=c_alert_weak, style='italic'}, + Info = {fg=c_alert_weak, style='italic'}, Warning = {fg=c_alert}, --[[ 4.2... Editor UI ]] @@ -372,33 +359,33 @@ local highlight_groups = { Folded = {fg=c_fg_strong, style='bold'}, --[[ 4.2.6. Diffs]] - DiffAdd = {fg=c_bg, bg=green_dark}, - DiffChange = NONE, - DiffDelete = function(self) return {fg=self.DiffAdd.fg, bg=c_alert} end, - DiffText = function(self) return {fg=self.DiffAdd.fg, bg=yellow} end, + DiffAdd = {bg=c_bg_diff_add}, + DiffChange = {bg=c_bg_diff_change}, + DiffDelete = {bg=c_bg_diff_delete}, + DiffText = {fg=c_fg_strongest, bg=c_bg_diff_add}, --[[ 4.2.7. Searching]] IncSearch = {style='inverse'}, - MatchParen = {fg=green, style={'bold', 'underline'}}, + MatchParen = {style={'bold', 'underline', color=c_fg_strongest}}, Search = {style={'underline', color=c_fg_strongest}}, --[[ 4.2.8. Spelling]] - SpellBad = {style={'undercurl', color=c_alert}}, - SpellCap = {style={'undercurl', color=yellow}}, - SpellLocal = {style={'undercurl', color=green}}, - SpellRare = {style={'undercurl', color=orange}}, + SpellBad = {bg=c_bg_error_weak, fg=c_alert_strong,}, + SpellCap = {bg=c_bg_error_weak, fg=c_alert}, + SpellLocal = {bg=c_bg_error_weak, fg=c_alert_weak}, + SpellRare = {bg=c_bg_error_weak, fg=c_alert_weak}, --[[ 4.2.9. Conditional Column Highlighting]] - ColorColumn = {style='inverse'}, + ColorColumn = {bg=c_bg_hl_weak}, SignColumn = NONE, --[[ 4.2.10. Messages]] ErrorMsg = {fg=c_alert, style='bold'}, - HintMsg = {fg=magenta, style='italic'}, - InfoMsg = {fg=pink_light, style='italic'}, - ModeMsg = {fg=yellow}, - WarningMsg = {fg=orange, style='bold'}, - Question = {fg=orange_light, style='underline'}, + HintMsg = {fg=c_alert_weak, style='italic'}, + InfoMsg = {fg=c_alert_weak, style='italic'}, + ModeMsg = {fg=c_question}, + WarningMsg = {fg=c_alert, style='bold'}, + Question = {fg=c_question, style='bold'}, --[[ 4.2.11. LSP ]] LspDiagnosticsDefaultError = 'Error', @@ -488,7 +475,7 @@ local highlight_groups = { cssAttrComma = 'Noise', cssAttrRegion = 'Keyword', cssBraces = 'Delimiter', - cssClassName = 'Identifier', + cssClassName = {fg=c_2}, cssClassNameDot = 'Noise', cssFlexibleBoxAttr = 'cssAttr', cssFunctionComma = 'Noise', @@ -498,22 +485,19 @@ local highlight_groups = { cssPseudoClass = 'Special', cssPseudoClassId = 'cssSelectorOp', cssSelectorOp = 'Operator', - cssTagName = 'Structure', + cssTagName = 'htmlTagName', cssUnitDecorators = 'Type', scssAmpersand = 'Special', scssAttribute = 'Noise', scssBoolean = 'Boolean', scssDefault = 'Keyword', scssElse = 'scssIf', - scssMixinName = function(self) - local super = self.cssClassName - return {bg=super.bg, fg=super.fg, style='Italic'} - end, + scssMixinName = 'Function', scssIf = 'PreCondit', scssInclude = 'Include', scssSelectorChar = 'Delimiter', scssDefinition = 'PreProc', - scssSelectorName = 'Identifier', + scssSelectorName = 'cssClassName', scssVariable = 'Define', scssVariableAssignment = 'Operator', @@ -549,8 +533,8 @@ local highlight_groups = { --[[ 4.3.8. HTML ]] htmlArg = 'Label', - htmlBold = {fg=c_fg_weak, style='bold'}, - htmlTitle = 'htmlBold', + htmlBold = {style='bold'}, + htmlTitle = {fg=c_fg_strongest, style='bold'}, htmlEndTag = 'htmlTag', htmlH1 = 'markdownH1', htmlH2 = 'markdownH2', @@ -560,9 +544,9 @@ local highlight_groups = { htmlH6 = 'markdownH6', htmlItalic = {style='italic'}, htmlSpecialTagName = 'Keyword', - htmlTag = 'Special', - htmlTagN = 'Typedef', - htmlTagName = 'Type', + htmlTag = {fg=c_3}, + htmlTagN = htmlTagName, + htmlTagName = {fg=c_3}, --[[ 4.3.9. Java ]] javaClassDecl = 'Structure', @@ -612,19 +596,19 @@ local highlight_groups = { --[[ 4.3.13. Markdown ]] markdownCode = 'mkdCode', markdownCodeDelimiter = 'mkdCodeDelimiter', - markdownH1 = {fg=c_alert, style='bold'}, - markdownH2 = {fg=orange, style='bold'}, - markdownH3 = {fg=yellow, style='bold'}, - markdownH4 = {fg=green_dark, style='bold'}, - markdownH5 = {fg=cyan, style='bold'}, - markdownH6 = {fg=purple_light, style='bold'}, + markdownH1 = {fg=c_fg_strongest, style='bold'}, + markdownH2 = {fg=fg_strongest, style='bold'}, + markdownH3 = {fg=c_fg_strong, style='bold'}, + markdownH4 = {fg=c_fg_strong, style='bold'}, + markdownH5 = {fg=c_fg_strong, style='bold'}, + markdownH6 = {fg=c_fg_strong, style='bold'}, markdownLinkDelimiter = 'Delimiter', markdownLinkTextDelimiter = 'markdownLinkDelimiter', - markdownUrl = 'Underlined', - mkdBold = 'Ignore', + markdownUrl = {fg=c_primary}, + mkdBold = {style='bold'}, mkdBoldItalic = 'mkdBold', mkdCode = 'Keyword', - mkdCodeDelimiter = 'mkdBold', + mkdCodeDelimiter = 'Noise', mkdCodeEnd = 'mkdCodeStart', mkdCodeStart = 'mkdCodeDelimiter', mkdHeading = 'Delimiter', @@ -794,7 +778,8 @@ local highlight_groups = { helpOption = 'Keyword', helpHeadline = 'Title', helpSectionDelim = 'Delimiter', - helpHyperTextJump = 'Underlined', + helpHyperTextJump = 'Special', + helpExample = 'Info', --[[ 4.3.38 Man ]] -- manBold = function(self) return vim.tbl_extend('force', self.mkdCode, {style='nocombine'}) end, @@ -826,10 +811,10 @@ local highlight_groups = { JumpMotion = 'EasyMotion', --[[ 4.4.4. vim-gitgutter / vim-signify ]] - GitGutterAdd = {fg = green}, - GitGutterChange = {fg = yellow}, - GitGutterDelete = {fg = c_alert}, - GitGutterChangeDelete = {fg=orange}, + GitGutterAdd = {fg=c_add}, + GitGutterChange = {fg=c_change}, + GitGutterDelete = {fg=c_delete}, + GitGutterChangeDelete = {fg=c_change}, SignifySignAdd = 'GitGutterAdd', SignifySignChange = 'GitGutterChange', @@ -837,8 +822,8 @@ local highlight_groups = { SignifySignChangeDelete = 'GitGutterChangeDelete', --[[ 4.4.5. vim-indent-guides ]] - IndentGuidesOdd = {bg=c_bg_darkest}, - IndentGuidesEven = {bg=c_fg}, + IndentGuidesOdd = {bg=c_bg_hl}, + IndentGuidesEven = {bg=c_bg_hl_strong}, --[[ 4.4.7. NERDTree ]] NERDTreeCWD = 'Label', @@ -862,7 +847,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=c_bg, style='bold'}, + BufferCurrentMod = {fg=c_change, bg=c_bg, style='bold'}, BufferCurrentSign = 'HintMsg', BufferCurrentTarget = 'BufferCurrentSign', @@ -941,7 +926,7 @@ local highlight_groups = { packerPackageNotLoaded = 'Ignore', packerStatusFail = 'Statement', packerStatusSuccess = 'packerStatusFail', - packerSuccess = function(self) return {fg=green, style=self.packerFail.style} end, + packerSuccess = function(self) return {fg=c_add, style=self.packerFail.style} end, -- [[ 5.0.1 custom ]] TabLineFill = { fg=ui_bg, fg=ui_bg, style='italic' },