lambdaisland / kaocha

Full featured next gen Clojure test runner
https://cljdoc.org/d/lambdaisland/kaocha/1.0.861/doc/1-introduction
Eclipse Public License 1.0
792 stars 81 forks source link

Use colors that support both dark and light color schemes #403

Open heralden opened 1 year ago

heralden commented 1 year ago

The default colors used in kaocha test outputs aren't readable if you're using a light color scheme.

Screenshot 2023-03-16 at 11 32 23

How about changing some of the colors so that they work for both dark and light color schemes?

alysbrooks commented 1 year ago

I think this makes a lot of sense (and eventually, we probably want to add customization options).

plexus commented 1 year ago

Note that this is really a deep-diff2 concern, can we file an issue there and link to it from here?

Agreed on configurability, it's going to be hard to please everyone when it comes to colors. In which case it could be a kaocha concern to expose those configuration options.

alysbrooks commented 1 year ago

I daresay this could also be an accessibility concern; I'm not sure our colors are colorblind friendly.

alysbrooks commented 1 year ago

As an update on what we've found/discussed: We use the standard terminal colors and they're ultimately set by the terminal emulator. We may add some functionality to make changing the color scheme of deep-diff2 easier, but it is already possible to make that change, so one of our next steps is enabling that configuration from Kaocha.

What I'm leaning toward is making three changes to Kaocha:

plexus commented 1 year ago

Thank you @alysbrooks , I like those proposals. Something I was also thinking about is that maybe we should have a scheme that people can easily switch to that's suitable for common forms of color blindness. The current red/green is pretty terrible in that regard. We currently don't really have any "global" kaocha config, but for something like this it would be useful to be able to configure this outside any specific project (eg a user config file or env var).