Closed vihu closed 1 year ago
Thanks for suggestion! It seems like a small but valuable change. I'll think it through and test it for some time. Your reference PR is very handy, thanks!
I have two thoughts about this right now:
Normal
highlight group, I am leaning towards adding hi Normal guifg=NONE guibg=NONE
to documentation for that. Either as a separate call or inside autocommand for ColorSchemePre
event.Am I missing something here?
I've given this some thought and I think it is better to not include both dimming and transparency in the 'mini.base16' config.
The reason for dimming is as stated earlier: there is no color in base16 palette that can be used for dimmed background.
The reason for transparency is that it indeed seems to be a case of "disabling" Normal
highlight group. Thus can be done with a described highlight
call (possibly inside autocommand).
Thank you for taking interest in improving 'mini.base16'.
Hi @echasnovski !
Disabling the normal group does not seem to be enough. Example screenshot:
Here's the same screenshot with the dedicated catppuccin theme:
Disabling the normal group does not seem to be enough. Example screenshot:
Yes, indeed it is not quite enough to achieve 100% transparency, but it is close. Since this issue was closed I've added 'mini.colors' which has the ability to add transparency to any color scheme. So I'd suggest either use it directly (in a form of creating and managing your own color scheme file) or clear highlight groups which bother with not being transparent (here is a list from 'mini.colors' implementation).
Hi again!
I was able to use mini.colors
, although it's still missing a few areas
(in this instance, telescope and the gitsigns column thingy)
I'm not sure how I'd even go about finding what the names of those highlight groups is. I'm also not sure how I'd go about fixing bad contrast areas like this one in the mini statusbar:
Who knows, perhaps generic generated colorschemes can't look quite as good as handmade ones, although that's a bit sad.
If it helps in any way, here's my current colorscheme file:
local base16 = require("mini.base16")
local colors = require("mini.colors")
base16.setup({ palette = ... })
colors
.get_colorscheme()
:add_transparency({
general = true,
float = true,
statuscolumn = true,
statusline = true,
tabline = true,
winbar = true,
})
:apply()
vim.cmd([[highlight FloatBorder blend=0 guibg=NONE]])
vim.cmd([[highlight MiniStatuslineFilename blend=0 guibg=NONE]])
vim.cmd([[highlight Statusline blend=0 guibg=NONE]])
vim.cmd([[highlight StatuslineNC blend=0 guibg=NONE]])
The last 4 cmds were there from my time using the actual catppuccin theme, so I'm not 100% they are still needed.
Looking at /etc/stylix/palette.html
(which is a html preview of my current base16 theme), it does look like the backgrounds 03 and 04 have bad contrast with the text:
Is this something normal, or is it an issue with the base16 theme itself?
(in this instance, telescope and the gitsigns column thingy)
I'm not sure how I'd even go about finding what the names of those highlight groups is.
If it is in the text where cursor can reach, there is an :Inspect
command (in Neovim>=0.9) which shows highlighting at cursor.
Other than that, actual highlight group names should usually be mentioned in plugin's documentation. Another useful approach is to look at all defined highlight groups and see if they have relevant names and highlighting attributes. This can be done with plain :hi
, :Pick hl_groups
(with 'mini.pick'), or :Telescope highlights
.
If it helps in any way, here's my current colorscheme file:
Although doable, I'd suggest to not have calls :add_transparency:apply()
in the color scheme file. Although flexible and concise, this gets executed on every execution of script which is usually done on startup, thus increasing startup time couple of milliseconds.
Looking at /etc/stylix/palette.html (which is a html preview of my current base16 theme), it does look like the backgrounds 03 and 04 have bad contrast with the text:
Yes, to me first 8 colors doesn't look like a good choice for UI colors (according to Base16 styling).
Contributing guidelines
Module(s)
mini.base16
Description
Thank you for your excellent plugin suite. I was wondering if you could add two extra config parameters for
mini.base16
, specifically:For reference, I added the two options for gruvbox here, it would be really nice to support these for mini colorscheme as well :)