Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve background color #425

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lua/octo/ui/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,9 @@ end
function M.get_background_color_of_highlight_group(highlight_group_name)
local highlight_group = vim.api.nvim_get_hl_by_name(highlight_group_name, true)
local highlight_group_normal = vim.api.nvim_get_hl_by_name("Normal", true)
local background_color = highlight_group.background
or highlight_group_normal.background
or highlight_group_normal.foreground
local background_color = highlight_group.background or highlight_group_normal.background
if background_color then
return string.format("#%06x", background_color)
else
return "#000000"
end
end

Expand Down
Loading