Make the avy "blue" colour more readable

Relevant quote and my explanation:

    > it feels to me that the colors used for avy aren't easy to read,
    > especially the black foreground on blue background. I'm using
    > modus-themes because I have a problem seeing contrast with an overall
    > bad vision and I'm usually very happy with the colors you pick: I'm
    > wondering why this is different with these colors.

    I see what you mean.  Here we have a case where the 7:1 ratio is not
    consistent with the legibility we perceive.  The blue and the black have
    a 10:1 contrast, but it still feels inadequate:

        (modus-themes-contrast "#77baff" "#000000")
        ;; => 10.251949912839315

    My hypothesis is that this is because of colour perception: blue is the
    darkest colour so blue and black feels like "dark and dark".

I have had at least one more case where the modus-themes-intense-blue
felt hard to read while using modus-operandi.  I had already reviewed
the blue-intense-bg, but I plan to do so again.  Though I also need to
analyse how it is used.  For the time being, I feel this problem is
specific to Avy, due to the visuals of its interaction model.

Any small surface area with an intense background that contains a single
character can be harder to read, as the eye may blend everything into a
solid block (especially for black on blue).  When the area is larger,
the eye no longer blends the foreground and the background, making
everything appear at its nominal contrast ratio, which in our particular
case is > 10:1 (i.e. very high).

Thanks to Damien Cassou for the feedback:
<https://lists.sr.ht/~protesilaos/modus-themes/%3C87czhgt5nm.fsf%40cassou.me%3E>.
This commit is contained in:
Protesilaos Stavrou 2022-04-18 19:31:38 +03:00
parent 2329803b86
commit 872b71772e
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -4789,7 +4789,7 @@ by virtue of calling either of `modus-themes-load-operandi' and
;;;;; avy
`(avy-background-face ((,class :background ,bg-dim :foreground ,fg-dim :extend t)))
`(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-neutral bold))))
`(avy-lead-face ((,class :inherit (modus-themes-intense-blue bold modus-themes-reset-soft))))
`(avy-lead-face ((,class :inherit (modus-themes-special-cold bold modus-themes-reset-soft))))
`(avy-lead-face-0 ((,class :inherit (modus-themes-refine-magenta bold modus-themes-reset-soft))))
`(avy-lead-face-1 ((,class :inherit (modus-themes-special-warm modus-themes-reset-soft))))
`(avy-lead-face-2 ((,class :inherit (modus-themes-refine-green bold modus-themes-reset-soft))))