Cthulhu.jl icon indicating copy to clipboard operation
Cthulhu.jl copied to clipboard

A more colourful menu

Open thazhemadam opened this issue 2 years ago • 9 comments

This PR adds colours to the menu options and also makes the colours for options that can be toggled (except for debuginfo) more expressive.

Before:

before

After:

after

thazhemadam avatar Oct 06 '21 19:10 thazhemadam

I went with the red-green combo because it felt intuitive - green means yes and red means no; but I didn't take color blindness into account!

Any chance we can choose a more colorblind-friendly set of colors?

Absolutely! Do you have any in mind or a personal preference from these (or any other) palettes?

thazhemadam avatar Oct 06 '21 20:10 thazhemadam

Codecov Report

Merging #236 (6471471) into master (6880b9e) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
+ Coverage   82.85%   82.89%   +0.03%     
==========================================
  Files           7        7              
  Lines        1021     1023       +2     
==========================================
+ Hits          846      848       +2     
  Misses        175      175              
Impacted Files Coverage Δ
src/ui.jl 83.87% <100.00%> (+0.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6880b9e...6471471. Read the comment docs.

codecov-commenter avatar Oct 06 '21 22:10 codecov-commenter

I agree completely that for the non-colorblind red/green is indeed very intuitive, and that no other color combo quite matches it. But so many people are affected by some form of colorblindness that to me I think we have to account for their needs.

I am definitely not an expert and would defer to your or others' choices, but to me both the green/purple (lower left in "accessible palettes) or the blue/magenta (lower right) seem reasonably intuitive.

timholy avatar Oct 07 '21 07:10 timholy

Hmm, I wonder if we need to customize the color choice dependent on system? On my Ubuntu desktop, the purple kind of fades into the background for obvious reasons:

image

timholy avatar Oct 11 '21 15:10 timholy

Hmm, I wonder if we need to customize the color choice dependent on system?

I don't think that would be a good idea as there's a good chance that any colour combination we pick might appear faded in a similar manner, depending upon users' terminal settings. I don't think there's one size that fits all for this, so we should probably just pick one colour palette and stick with it.

On a related note, I also think brighter colours might make the content more easily discernible (the yellow-pink palette here seems to be one of the brighter pairs, but I'm not sure they're the most intuitive 😅 ).

thazhemadam avatar Oct 11 '21 18:10 thazhemadam

What about making it configurable? E.g.,

startup.jl

const CTHULHU_ON = :green
const CTHULHU_OFF = :red

for those of us who can see those colors (and default to the ones you've chosen). Internally you can use isdefined(Main, :CTHULHU_ON) ? Main.CTHULHU_ON : :blue etc. Alternatively you could look in ENV.

timholy avatar Oct 11 '21 20:10 timholy

What about making it configurable?

I like this idea. But what do you think about making it configurable through Cthulhu.CONFIG instead?

thazhemadam avatar Oct 17 '21 06:10 thazhemadam

i'd love this feature! to be friendly to colorblind, maybe we could default the coloring to be as-is (off) and leave the config to another PR?

@thazhemadam thanks for doing this

anandijain avatar Oct 27 '22 14:10 anandijain