Compare commits

..

No commits in common. "f3ae0c07c39b28341da0f96ab37e17864426a5ab" and "6063ca4cda77949e44eb9140a473029b420353d9" have entirely different histories.

2 changed files with 67 additions and 77 deletions

View file

@ -1,69 +1,62 @@
local M = {} local M = {}
local to_hex = function(s)
local r, g, b = string.match(s, "^rgb%(%s*(%d+),%s*(%d+),%s*(%d+)%)")
return string.format("#%02x%02x%02x", r, g, b)
end
M.colors = function() M.colors = function()
local c = { local c = { -- 16 | 16 | 256 |
dark0_h = to_hex("rgb( 19, 21, 22)"), -- dark | light | colors | R G B
dark0 = to_hex("rgb( 24, 25, 26)"), --------+-------+--------+---------------
dark0_s = to_hex("rgb( 29, 32, 33)"), -- bg0_h dark0 = '#171a1b', -- | | 232 | 23 26 27
-- to_hex("rgb( 40, 40, 40)"), -- bg0 dark0_s = '#1d2021', -- | | 233 | 29 32 33
-- to_hex("rgb( 50, 48, 47)"), -- bg0_s dark1 = '#3c3836', -- | 15 | 237 | 60 56 54
dark1 = to_hex("rgb( 60, 56, 54)"), dark2 = '#504945', -- | | 239 | 80 73 69
dark2 = to_hex("rgb( 80, 73, 69)"), dark3 = '#665c54', -- | | 241 | 102 92 84
dark3 = to_hex("rgb(102, 92, 84)"), dark4 = '#7c6f64', -- | 7 | 243 | 124 111 100
dark4 = to_hex("rgb(124, 111, 100)"), gray = '#928374', -- 8 | 8 | 24[4,5]| 146 131 116
gray = to_hex("rgb(146, 131, 116)"), light4 = '#a89984', -- 7 | | 246 | 168 153 132
light4 = to_hex("rgb(168, 153, 132)"), light3 = '#bdae93', -- | | 248 | 189 174 147
light3 = to_hex("rgb(189, 174, 147)"), light2 = '#d5c4a1', -- | | 250 | 213 196 161
light2 = to_hex("rgb(213, 196, 161)"), light1 = '#ebdbb2', -- 15 | | 223 | 235 219 178
light1 = to_hex("rgb(235, 219, 178)"), light0_s = '#f2e5bc', -- | | 228 | 242 229 188
light0_s = to_hex("rgb(242, 229, 188)"), light0 = '#fbf1c7', -- | 0 | 229 | 253 244 193
light0 = to_hex("rgb(251, 241, 199)"),
light0_h = to_hex("rgb(249, 245, 215)"),
red_darkest = to_hex("rgb( 46, 16, 15)"), red_darkest = '#2e100f',
green_darkest = to_hex("rgb( 46, 46, 15)"), green_darkest = '#2e2e0f',
yellow_darkest = to_hex("rgb( 46, 36, 15)"), yellow_darkest = '#2e240f',
blue_darkest = to_hex("rgb( 20, 40, 41)"), blue_darkest = '#142829',
purple_darkest = to_hex("rgb( 41, 20, 30)"), purple_darkest = '#29141e',
aqua_darkest = to_hex("rgb( 24, 37, 25)"), aqua_darkest = '#182519',
orange_darkest = to_hex("rgb( 50, 26, 11)"), orange_darkest = '#321a0b',
red_darker = to_hex("rgb(157, 0, 6)"), red_darker = '#9d0006', -- | 9 | 88 | 157 0 6
green_darker = to_hex("rgb(121, 116, 14)"), green_darker = '#79740e', -- | 10 | 100 | 121 116 14
yellow_darker = to_hex("rgb(181, 118, 20)"), yellow_darker = '#b57614', -- | 11 | 136 | 181 118 20
blue_darker = to_hex("rgb( 7, 102, 120)"), blue_darker = '#076678', -- | 12 | 24 | 6 102 120
purple_darker = to_hex("rgb(143, 63, 113)"), purple_darker = '#8f3f71', -- | 13 | 96 | 143 63 113
aqua_darker = to_hex("rgb( 66, 123, 88)"), aqua_darker = '#427b58', -- | 14 | 66 | 66 123 88
orange_darker = to_hex("rgb(175, 58, 3)"), orange_darker = '#af3a03', -- | | 130 | 175 58 3
red = to_hex("rgb(204, 36, 29)"), red = '#cc241d', -- 1 | 1 | 123 | 204 36 29
green = to_hex("rgb(152, 151, 26)"), green = '#98971a', -- 2 | 2 | 106 | 152 151 26
yellow = to_hex("rgb(215, 153, 33)"), yellow = '#d79921', -- 3 | 3 | 172 | 215 153 33
blue = to_hex("rgb( 69, 133, 136)"), blue = '#458588', -- 4 | 4 | 66 | 69 133 136
purple = to_hex("rgb(177, 98, 134)"), purple = '#b16286', -- 5 | 5 | 132 | 177 98 134
aqua = to_hex("rgb(104, 157, 106)"), aqua = '#689d6a', -- 6 | 6 | 72 | 104 157 106
orange = to_hex("rgb(214, 93, 14)"), orange = '#d65d0e', -- | | 166 | 214 93 14
red_lighter = to_hex("rgb(251, 73, 52)"), red_lighter = '#fb4934', -- 9 | | 167 | 251 73 52
green_lighter = to_hex("rgb(184, 187, 38)"), green_lighter = '#b8bb26', -- 10 | | 142 | 184 187 38
yellow_lighter = to_hex("rgb(250, 189, 47)"), yellow_lighter = '#fabd2f', -- 11 | | 214 | 250 189 47
blue_lighter = to_hex("rgb(131, 165, 152)"), blue_lighter = '#83a598', -- 12 | | 109 | 131 165 152
purple_lighter = to_hex("rgb(211, 134, 155)"), purple_lighter = '#d3869b', -- 13 | | 175 | 211 134 155
aqua_lighter = to_hex("rgb(142, 192, 124)"), aqua_lighter = '#8ec07c', -- 14 | | 108 | 142 192 124
orange_lighter = to_hex("rgb(254, 128, 25)"), orange_lighter = '#fe8019', -- | | 208 | 254 128 25
red_lightest = to_hex("rgb(255, 215, 212)"), red_lightest = '#ffd7d4',
green_lightest = to_hex("rgb(238, 238, 210)"), green_lightest = '#eeeed2',
yellow_lightest = to_hex("rgb(243, 234, 206)"), yellow_lightest = '#f3eace',
blue_lightest = to_hex("rgb(210, 228, 229)"), blue_lightest = '#d2e4e5',
purple_lightest = to_hex("rgb(242, 222, 231)"), purple_lightest = '#f2dee7',
aqua_lightest = to_hex("rgb(212, 227, 212)"), aqua_lightest = '#d4e3d4',
orange_lightest = to_hex("rgb(243, 224, 211)"), orange_lightest = '#f3e0d3',
} }
local is_dark = vim.opt.background:get() == 'dark' local is_dark = vim.opt.background:get() == 'dark'
@ -74,9 +67,7 @@ M.colors = function()
palette['bg' .. tostring(i)] = c[(is_dark and 'dark' or 'light') .. tostring(i)] palette['bg' .. tostring(i)] = c[(is_dark and 'dark' or 'light') .. tostring(i)]
end end
palette['fg0_h'] = c[(is_dark and 'light' or 'dark') .. '0_h']
palette['fg0_s'] = c[(is_dark and 'light' or 'dark') .. '0_s'] palette['fg0_s'] = c[(is_dark and 'light' or 'dark') .. '0_s']
palette['bg0_h'] = c[(is_dark and 'dark' or 'light') .. '0_h']
palette['bg0_s'] = c[(is_dark and 'dark' or 'light') .. '0_s'] palette['bg0_s'] = c[(is_dark and 'dark' or 'light') .. '0_s']
for _, accent in ipairs({'red', 'green', 'yellow', 'blue', 'purple', 'aqua', 'orange'}) do for _, accent in ipairs({'red', 'green', 'yellow', 'blue', 'purple', 'aqua', 'orange'}) do
@ -92,12 +83,12 @@ end
M.highlights = function() M.highlights = function()
local C = M.colors() local C = M.colors()
local fg = C.fg3 local fg = C.fg3
local bg = C.bg0_h local bg = C.bg0
return { return {
standard = { standard = {
Normal = { fg = fg, bg = bg }, -- normal text Normal = { fg = fg, bg = bg }, -- normal text
NormalNC = { fg = fg, bg = C.bg0 }, -- normal text in non-current windows NormalNC = { fg = fg, bg = C.bg0_s }, -- normal text in non-current windows
NormalFloat = { link = 'Normal' }, -- floating windows NormalFloat = { link = 'Normal' }, -- floating windows
FloatBorder = { fg = C.gray, bg = bg }, FloatBorder = { fg = C.gray, bg = bg },
@ -164,8 +155,8 @@ M.highlights = function()
TermCursor = { link = 'Cursor' }, TermCursor = { link = 'Cursor' },
LineNr = { fg = C.bg3 }, LineNr = { fg = C.bg3 },
CursorLine = { bg = C.bg0 }, CursorLine = { bg = C.bg0_s },
CursorLineNr = { bg = C.bg0, fg = C.fg2 }, CursorLineNr = { bg = C.bg0_s, fg = C.fg2 },
IncSearch = { link = 'CurSearch' }, IncSearch = { link = 'CurSearch' },
CurSearch = { fg = C.purple_bg, bg = C.br_purple, bold = true }, CurSearch = { fg = C.purple_bg, bg = C.br_purple, bold = true },
@ -204,7 +195,7 @@ M.highlights = function()
Directory = { fg = C.blue }, Directory = { fg = C.blue },
NonText = { fg = C.bg3 }, -- subtle EOL symbols NonText = { fg = C.bg1 }, -- subtle EOL symbols
Whitespace = { fg = C.orange }, -- listchars Whitespace = { fg = C.orange }, -- listchars
QuickFixLine = { fg = C.yellow , bg = C.bg2 }, -- selected quickfix item QuickFixLine = { fg = C.yellow , bg = C.bg2 }, -- selected quickfix item
@ -647,9 +638,8 @@ M.highlights = function()
-- 'lukas-reineke/virt-column.nvim' -- 'lukas-reineke/virt-column.nvim'
virt_column = { virt_column = {
VirtColumn1 = { fg = C.bg1 }, VirtColumn = { fg = C.bg1 }, -- virtual column
VirtColumn2 = { fg = C.dim_yellow, bg = C.bg0 }, ColorColumn = {}, -- otherwise this is visible behind VirtColumn
VirtColumn3 = { fg = C.dim_red, bg = C.orange_bg },
}, },
-- 'kyazdani42/nvim-tree.lua' -- 'kyazdani42/nvim-tree.lua'

View file

@ -2,25 +2,25 @@ local C = require 'gruvbox'.colors()
return { return {
normal = { normal = {
a = { fg = C.bg0_h, bg = C.blue, bold = true }, a = { fg = C.bg0, bg = C.blue, bold = true },
b = { fg = C.fg2, bg = C.bg1 }, b = { fg = C.fg2, bg = C.bg2 },
c = { fg = C.fg2, bg = C.bg0_s }, c = { fg = C.fg2, bg = C.bg1 },
}, },
insert = { insert = {
a = { fg = C.bg0_h, bg = C.green, bold = true }, a = { fg = C.bg0, bg = C.green, bold = true },
}, },
visual = { visual = {
a = { fg = C.bg0_h, bg = C.purple, bold = true }, a = { fg = C.bg0, bg = C.purple, bold = true },
}, },
replace = { replace = {
a = { fg = C.bg0_h, bg = C.red, bold = true }, a = { fg = C.bg0, bg = C.red, bold = true },
}, },
command = { command = {
a = { fg = C.bg0_h, bg = C.yellow, bold = true }, a = { fg = C.bg0, bg = C.yellow, bold = true },
}, },
inactive = { inactive = {
a = { fg = C.fg4, bg = C.bg2 }, a = { fg = C.fg4, bg = C.bg2 },
b = { fg = C.fg4, bg = C.bg1 }, b = { fg = C.fg4, bg = C.bg2 },
c = { fg = C.fg4, bg = C.bg0_s }, c = { fg = C.fg4, bg = C.bg1 },
}, },
} }