Skip to content

Commit

Permalink
Merge pull request #456 from kezhenxu94/color
Browse files Browse the repository at this point in the history
  • Loading branch information
pwntester authored Nov 24, 2023
2 parents 5d6bed6 + 89a33ba commit 1ce62d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/octo/ui/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ local function color_is_bright(r, g, b)
end

function M.get_background_color_of_highlight_group(highlight_group_name)
local highlight_group = vim.api.nvim_get_hl(0, { name = highlight_group_name })
local highlight_group_normal = vim.api.nvim_get_hl(0, { name = "Normal" })
local background_color = highlight_group.background or highlight_group_normal.background
local highlight_group = vim.api.nvim_get_hl(0, { name = highlight_group_name, link = false })
local highlight_group_normal = vim.api.nvim_get_hl(0, { name = "Normal", link = false })
local background_color = highlight_group.bg or highlight_group_normal.bg
if background_color then
return string.format("#%06x", background_color)
end
Expand Down

0 comments on commit 1ce62d9

Please sign in to comment.