The previous style involved the use of a dim grey background. While
this is good to spot invisible characters quickly, it is bad for users
who want to run 'whitespace-mode' at all times (e.g. for Python which
is space-sensitive).
We thus remove the backgrounds by default but provide the option to
reinstate them via palette overrides (as documented at length in the
manual). To this end, we have two new semantic colour mappings for
ordinary negative space and its invisible characters.
Thanks to Christian Tietze and Oliver Epper for their feedback in
issue 80 on the GitHub mirror: <https://github.com/protesilaos/modus-themes/issues/80>.
This specifies what the colours are used for. Otherwise they are
confusing.
This change breaks any colour overrides for those names. They need to
be renamed to use "-fringe" instead of "-intense".
Thanks to Andrew Troppin for showing me some usability issues with the
previous style. This was done via a private channel and the
information is shared with permission.
This means that a semantic colour mapping in the palette can have as
its value another mapping. The function will find the underlying
colour.
This solves a problem reported by Imran Khan on the mailing list:
<https://lists.sr.ht/~protesilaos/modus-themes/%3Cb7ca4702162fd575593f8ded28d9a888.contact%40imrankhan.live%3E>.
I was aware of it from before the release of version 4.0.0 but I was
hesitant to implement recursion prior to getting some feedback on the
new palette overriding feature.
Also thanks to Christian Tietze for participating in that discussion
on the mailing list.
These are now used in the rainbow-delimiters package, but there may be
more applications.
Thanks to Aleksei Pirogov for bringing this matter to my attention in
issue 54 on the GitHub mirror: <https://github.com/protesilaos/modus-themes/issues/54>.
The user can thus override the 'fringe' mapping to whatever colour
they prefer, instead of us hardcoding it to two shades of gray.
To make the 'fringe' invisible, set it to the main background.
Video tutorial on colour mappings:
<https://protesilaos.com/codelog/2022-12-17-modus-themes-v4-demo/>.
Providing bespoke themes gives us the freedom to implement changes
wherever necessary without making the code more complex. The now
discontinued 'modus-themes-deuteranopia' was a user option with
limited scope: it simply replaced green with blue in some contexts.
But a proper design for deuteranopia requires more than that. These
new themes are the right solution and I am sure the people who need
them will greatly appreciate them.
You can play around with the following, changing "bg-cyan" to one of
bg-{red,green,yellow,blue,magenta}.
(setopt modus-themes-to-toggle '(modus-operandi modus-operandi-tinted))
(setopt modus-themes-to-toggle '(modus-vivendi modus-vivendi-tinted))
(setq modus-operandi-palette-overrides '((bg-mode-line-active bg-cyan))
modus-operandi-tinted-palette-overrides modus-operandi-palette-overrides
modus-vivendi-palette-overrides modus-operandi-palette-overrides
modus-vivendi-tinted-palette-overrides modus-operandi-palette-overrides)
The user has the option to override the bg-completion colour, which
gives them all they need. I had already deprecated the "intense"
style earlier, though not from the docs.
Version 4 of the modus-themes is abstracting each theme's palette,
introduces semantic colour mappings, and expands the scope of the
palette overrides. I am removing user options, but am actually giving
user more power over how to tweak the theme. Overview:
<https://protesilaos.com/codelog/2022-12-07-modus-themes-4-colour-values-mappings/>.
As this diff demonstrates, we remove a lot of the complexity from the
themes.
I had removed it from the modus-themes.el as part of the refactoring
that (i) simplifies the main file, and (ii) introduces colour mapping
to each theme's palette.
The colour palettes are now defined in the individual themes. This
means that we can, in principle, introduce more themes without ever
expanding modus-themes.el (the user can also register their own Modus
theme variant, which we will eventually document in the manual).