TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
8k stars 1.18k forks source link

[IDEA] Improve contrast for muted text #7062

Open EvidentlyCube opened 1 year ago

EvidentlyCube commented 1 year ago

Is your feature request related to a problem? Please describe. The default color for Vanilla palette's muted text has terrible contrast:

image

I think it should be improved. To make it pass the AAA level it has to be at least #595959:

image

Or #767676 to pass the AA level:

image

Describe the solution you'd like I'd like the muted-foreground color in Vanilla palette to be either #767676 or #595959. I have a fairly decent eyesight and I still have trouble reading it.

Describe alternatives you've considered It affects me in my plugin development as I want to make the adapt to user's palette by using their colors. Best I can do is make my own CSS class with something like this:

.my-muted {
    color: <<colour foreground>>;
    opacity: 0.75;
}

But I'd much rather prefer to use user's selected palette.

EvidentlyCube commented 1 year ago

I also checked how things look in other default palettes and some notes:

But truth be told, I'd just improve the contrast of ones where contrast is below 4.5, which is enough to pass AA level for small text. And for ones where default text color has worse contrast than that or than muted text just do nothing.

pmario commented 1 year ago

IMO you talk about "muted" text. I'm OK if the default text has a contrast ratio of 7:1 but "muted"?

IMO muted is used to show disabled stuff and elements that change contrast on hover,

EvidentlyCube commented 1 year ago

IMO muted is used to show disabled stuff and elements that change contrast on hover,

@pmario Counterpoints:

All in all I'd say it's used a lot for secondary text in TW so it makes sense to treat it like that, rather than just something explicitly for disabled/hoverable elements.

pmario commented 1 year ago

You are right, in Palette-Manager I did also mark it as problematic: muted-foreground is used 43 times in vanilla.

I think we need a new name for "disabled-foreground" and "disabled-background" so we can use muted with more contrast. So I think I support your request

image

pmario commented 1 year ago

I also checked how things look in other default palettes and some notes:

I think all of them have to be checked. Eg: Rocker is terrible, It hides some elements on-hover ... Which is also the case for some others.

I think the new palette-manager edition would make it easier to see the problems.

I found out, that there is a general problem, that some colours are used for completely wrong elements. .. So IMO it would be good to have a closer look in general and fix that too.

IMO foreground muted can be fixed as the first step .. I think

EvidentlyCube commented 1 year ago

I think a neat thing to have would be a kind of component explorer page which would have all the components displayed and described to make styling easier in general (did someone make anything like that yet?). I think it might be a better idea to convert this issue into a larger "do things properly" one (or create a new one and close this) since this is just one issue out of potentially so many and it's not like there is any hurry in getting this one done right now.

pmario commented 1 year ago

May be --> [IDEA] Improve contrast in TW palettes for better readability .... or something similar

pmario commented 1 year ago

I think a neat thing to have would be a kind of component explorer

With the palette-manager I did try to use "real UI elements" so to be able to interact with them when changing colour. There is no help text though.

But I would welcome some improvements for the preview tiddlers, which are part of the plugin. They are still somewhat rudimentary. ... Some have "todo" in them and some have "I don't know" (how it is used ;)

Jermolene commented 1 year ago

I'd like the muted-foreground color in Vanilla palette to be either #767676 or #595959. I have a fairly decent eyesight and I still have trouble reading it.

I concur @EvidentlyCube, and would favour #595959.

There's a very strong case for fixing as many of the contrast issues that we can, so I'd be very happy to see a PR.