Quansight-Labs / accessible-pygments

♿ Accessible pygments themes
https://quansight-labs.github.io/accessible-pygments/
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

Fix contrast failures for high contrast light theme #33

Closed gabalafou closed 7 months ago

gabalafou commented 9 months ago

Closes #30.

This PR updates the a11y-light and a11y-high-contrast-light themes.

For a11y-light, the main changes are:

color grid

For a11y-high-contrast-light:

color grid
github-actions[bot] commented 9 months ago

PR Preview Action v1.2.0 :---: :rocket: Deployed preview to https://Quansight-Labs.github.io/accessible-pygments/pr-preview/pr-33/ on branch gh-pages at 2024-03-28 17:01 UTC

gabalafou commented 9 months ago

I have some caveats with my work so far on this PR:

gabalafou commented 9 months ago

@trallard, I still have some misgivings about this PR.

Is it okay for us to so drastically change these themes now that we've published this repo?

trallard commented 9 months ago

I am not sure we are drastically changing the themes. I mean - hues are being preserved as much as possible and tweaks are being made to improve the accessibility so I would not be too worried about this.

The only question I have is why the yellow in the light theme? I mean this is a much brighter one that the one we currently have

gabalafou commented 9 months ago

Okay, I think this is ready for review

gabalafou commented 9 months ago

Note to self. I want to create some issues for this repo based on my experience of updating these two themes:

trallard commented 9 months ago

Looking at the proposed light and high_contrast_light themes above my first impression was that now the colours in both looked different 🤔 so I attempted to make these two closer looking (using the perceptually uniform colour palettes we have)

a11y-light - see the corresponding contrast grid

EightShapes_Contrast_Grid

In the grid, you can see the current colours (with names) vs. the proposed ones (no names). All the colours meet AA against the reference backgrounds. I also added a magenta to match the high-contrast theme.

⚠️ You will also notice that I changed the black and grey colours. Since the slat-gray in the high-contrast theme is the same as we are using in PST I thought we could use an alternative black (and shades) to keep this closer to the original theme's hue (and not directly use the PST theme colours)

See a11y-high-contrast-light and the corresponding contrast grid

EightShapes_Contrast_Grid

With these proposed changes, both themes are more consistent and we keep a higher contrast in the a11y-high-contrast-light theme vs the light one.

I can make the changes unless you are dying to make them @gabalafou or you have major reservations on the proposed changes/updates

gabalafou commented 8 months ago

Putting this on hold while we get #42 through

trallard commented 7 months ago

I was going to review again until I saw the last comment 😓 ping me when this is ready then

Carreau commented 7 months ago

42 is in, this got a bunch of conflicts now. I think most of them should be solvable by just re-generating the files.

gabalafou commented 7 months ago

I resolved some merge conflicts, but this is not yet ready for review

gabalafou commented 7 months ago

OK this is now ready for review

gabalafou commented 7 months ago

@Carreau thanks for approving this!

I think that @trallard should give this one final look and approval before I merge it in.

Carreau commented 7 months ago

Let's wait 48 hours and merge otherwise to have one less things on @trallard todo list, we can revise later if we wish.

Carreau commented 7 months ago

Seen with @trallard in person, merging.