norcalli / nvim-colorizer.lua

The fastest Neovim colorizer.
Other
2.23k stars 117 forks source link

Bug: The text completely blends with the background color of nvim and becomes unreadable. Happens in 'foreground' mode. #101

Open decipher-cs opened 3 months ago

decipher-cs commented 3 months ago

Describe the bug I'm using the tokyonight-night theme and any hex color with dark value just blends with the background when I set mode = foreground

To Reproduce Use this config and open any file with a hex color whose value is close to your theme's background color. The text will blend. I'm using the lazy plugin for setup and installation.

{
  "norcalli/nvim-colorizer.lua",
  config = function()
      require("colorizer").setup({}, { mode = "foreground" })
  end
},

Expected behavior I expected it to use some type of contrast detection algorithm and automatically switch the blending text to background mode.

Screenshots Screenshot_20240518_115735

Neovim Version: 0.9.5

Colorizer Version: I'm on commit a065833