Cthulhu.jl
Cthulhu.jl copied to clipboard
A more colourful menu
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:
After:
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?
Codecov Report
Merging #236 (6471471) into master (6880b9e) will increase coverage by
0.03%
. The diff coverage is100.00%
.
@@ 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.
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.
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:
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 😅 ).
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
.
What about making it configurable?
I like this idea. But what do you think about making it configurable through Cthulhu.CONFIG
instead?
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