Skip to content

Commit

Permalink
fix: Check background after configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
reobin committed Feb 3, 2025
1 parent 613441a commit b382295
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/extractor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ function M.extract(output_path)

local normal_bg_color_value = Vim.get_color_group_value("Normal", "bg#") or "#000000"

local current_background = Color.is_light(normal_bg_color_value) and "light" or "dark"

if background ~= current_background then
local is_current_background_light = Color.is_light(normal_bg_color_value)
if
is_current_background_light and background == "dark"
or not is_current_background_light and background == "light"
then
goto next_background
end

Expand Down

0 comments on commit b382295

Please sign in to comment.