-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Colored characters for AAStrings #96
Conversation
Hi Aidan, Thanks for the PR. This looks good to me. Let me take a quick look at the code. H. |
Here's another possible color palette using the published color-blind safe palette in https://www.nature.com/articles/nmeth.1618 (see this link for appearance under various colorblind types)
The letters are a little harder to read in this palette, but not too much. I've also visualized the current palette here for reference. |
Hmm.. the color-blind safe palette hardly looks as good as the pastel palette, unfortunately. Just tried the pastel palette in a terminal with a light background and I like it: It's very rainbow-ish but I don't have problems with that 😄 Some minor formatting stuff about the code:
Also please add something about this in Thanks! |
Thanks for the comment! Re: your points, I'll make those changes. Maybe it would make sense to let users change the color palette in some way? The DNA/RNA alphabet coloring also has some colorblind issues (see here); it shouldn't be too hard to add a toggle to swap over the coloring scheme if users wish. I can look into that for a future addition. |
Yep. This was pointed out to me when I implemented this 😞
Absolutely. Providing more than one palette and providing some way for the user to choose their preferred palettes (e.g. via some global option) would be the way to go. Thanks for the offer! H. |
I think I've fixed all the issues--my editors are having trouble showing trailing whitespace, which may explain why there was so much... I'll plan to look at colorblind support as well next; I have the color palettes, so it shouldn't be a very difficult addition. I can add it into this PR or make a new one. |
That’s a fair point—I think the fact that the letters are readable and colors are able to be disabled does leave sufficient accessibility(although it’s always nice to have more!). I’m also more inclined towards the pastels, I think it’s a good middle ground between having colors and having them being quiet enough that the letters themselves are still the focal point for the user. I’m happy to work on adding in the colorblind option next in a separate submission; small low priority PRs like these are great for me to start getting familiar with the codebase. |
Bumped version and finally added all contributors to See commit 5d403d1 |
Small PR, just adds colored characters for AAStrings. Using a full 20 color palette is possible, but the result is relatively messy--difficult to choose colors that are simultaneously discernable, preserve readability of the characters, and don't overwhelm users.
Compromise chosen was to color bases based on physiochemical properties: https://www.jalview.org/help/html/colourSchemes/zappo.html
Color scheme chosen was a 7 color pastel to reduce the loudness of the color set. Result seems to be fairly easy to read while still being discernable. Color set is not colorblind friendly.
I'm open to adapting the color scheme to something else, it's written to be simple to change. I'm also happy to add in additional documentation to
AAString-class.Rd
describing how the bases are colored.All letters:
Example of an alignment:
Example of random characters: