galaxyproject / galaxy Public
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
Make tags more colourful #7072
Make tags more colourful #7072
Conversation
This comment has been hidden.
This comment has been hidden.
client/galaxy/scripts/utils/utils.js
Outdated
| } | ||
|
|
||
| export function generateTagColor(tagValue) { | ||
| //var r = (15 - ((hash & 0xf) % 6)).toString(16), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the 'light' version, left it in so I would not forget what I did, but should be dropped before merge.
|
Is it possible that these generated colors will be unreadable/colorblind unfriendly? |
This comment has been hidden.
This comment has been hidden.
|
This comment has been hidden.
This comment has been hidden.
|
@martenson agreed, it's pretty nice! I like it. So Galaxy community:
|
|
I like option 2 but maybe the border should be the same hue as the bg but darker. |
|
@jxtx sure, that's possible. Give me a few minutes. |
|
I was worried about 'too many lines' cluttering up the UI there with borders, but this looks nice. Same color but darker is a great idea. |
|
Dunno, can't tell much difference from grey lines. But I have imperfect colour vision (red-green blindness). Personally prefer grey lines but yeah. Another example. I've converted the code to use HSL (so the 'darker' could be implemented easily,) and it's taking some tries to find similarly good distributions to what I saw in RGB pastels. |
|
I think @jxtx meant the background color of the dataset not the background of the tag. |
|
@martenson oh, hmm. (thanks for clarification) |
This comment has been hidden.
This comment has been hidden.
|
Pastel with gray border (i.e. Option 2) looks best to me. |
|
this is cool, will be really nice for histories with many tags My vote goes to Option2 :) |
No, I meant the color of the tag. I liked that one. |
|
@jxtx Yeah, ok, when I zoom in like 500% I can see it, I'm looking at it again and it's ok. It looks a bit funny on yellow but the others are nice? Less grey is always good. I'll play around with it a bit and just find one that isn't too contrasting that certain ones stand out too much, but it's better than grey. Anything is better than grey. |
|
@jxtx my apologies We have a poll now. :) https://help.galaxyproject.org/t/what-colors-of-galaxy-tags-do-you-like-the-most/101 I will add the color-border option. @erasche can you please get me comparable screenshot? |
|
@martenson I'd say don't bother updating poll due to:
|
|
@erasche You got it.
This is nice behavior actually. |
Agreed, I can immediately imagine a bunch of bad uses for polls if it didn't. I like it! |
|
Thanks a bunch! |











EDIT
After much discussion we've settled on these Options.
Original Post
Today I was running through the peaks2genes tutorial and found that my eyes struggled to recognise if I was looking at something tagged
#peaksor#genes, and this wasn't great, they just all looked the same when scanning across a history. (I've added an example at the end.) So I've implemented coloured tags. The colours are done automatically from a hash of the string so they're stateless and consistent.Whole UI:
It just hashes the tag, and then pulls out some bits of that number. I've done a
%10which means that the lightest colour that can theoretically be generated is which doesn't have super amazing legibility but it isn't that bad (tags are already bad due to small size for that, this isn't making it that much worse.)I chose a hash function at random by googling, if there's something more appropriate (or already in codebase) let me know. You could probably optimise the colour distributions, I think the dark colours do not have a high perceptual difference but I'm not sure what to do about this. You could probably find a better mapping.
Light colours are also an option / nice?

The text was updated successfully, but these errors were encountered: