Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Force visually distinguishable account colors#1434

Merged
jancborchardt merged 1 commit intomasterfrom
space-account-colors-evenly
Apr 20, 2016
Merged

Force visually distinguishable account colors#1434
jancborchardt merged 1 commit intomasterfrom
space-account-colors-evenly

Conversation

@skjnldsv
Copy link
Contributor

Divide the hue value by 20, round it and multiply it again by 20.
This allows for (360/20) 18 differents colors.

@jancborchardt
Fix #1428

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @ChristophWurst, @Gomez and @jancborchardt to be potential reviewers

@jancborchardt
Copy link
Contributor

Hmm … either the value is too low or it’s not working. The colors are still very difficult to distinguish.

One is hsl(140, 60%, 68%) and the other hsl(160, 60%, 68%). Maybe let’s increase the distance initially to 30 or 40? If there’s more, we can still fill up inbetween.

@skjnldsv
Copy link
Contributor Author

The calcul is simple, if we divide by 40, we get (360/40) 9 different colors! And it's just a random possibility, the chance we get 2 exact same colors are as high as any other one.
If you really want a different color we should not use the core generator.

Or we should allow the user to change the hash we're using to generate the color therefore allow him to change the color he wants (but we keep the randomisation)

@jancborchardt
Copy link
Contributor

The point is that the feel of the colors across ownCloud should be similar. So I would say we need to use the generator here.

Let's maybe increase it to 30 to see if that works better? Or have a separate function for multi-color request with a variable amount of parameters – and the function ensures they are as distinct as possible.

@skjnldsv
Copy link
Contributor Author

I feel like doing some terrible coding! :p
I'm gonna do some screenshot of the different colors for 30 and 40 :)

@skjnldsv
Copy link
Contributor Author

Here you go: 20, 30 and 40.
contacts owncloud

@jancborchardt
Copy link
Contributor

jancborchardt commented Apr 19, 2016

Niice – yeah, that illustrates very well that we need the 40 value. With 30 still some green/turquoise and the rightmost pink colors are difficult to distinguish.

@skjnldsv
Copy link
Contributor Author

Got it :)

@skjnldsv skjnldsv force-pushed the space-account-colors-evenly branch from aab04fb to d3f351f Compare April 19, 2016 06:08
@skjnldsv
Copy link
Contributor Author

Here you go! @jancborchardt !
But keep in mind that doesn't mean you will get different colors! You could very well get 3 times the same! There's a very poor chance, but still ;)

@jancborchardt
Copy link
Contributor

Yeah, this is better! :)

About the different colors, that’s why I suggested above:

Or have a separate function for multi-color request with a variable amount of parameters – and the function ensures they are as distinct as possible.

And simply taking from the set of 9 above. That would be quite useful already for the multiple mail accounts and the calendar colors. :)

@jancborchardt jancborchardt merged commit f270d0f into master Apr 20, 2016
@jancborchardt jancborchardt deleted the space-account-colors-evenly branch April 20, 2016 12:51
@ChristophWurst
Copy link
Contributor

tztztz… failing CI tests and @jancborchardt hits the merge button

@jancborchardt
Copy link
Contributor

I AM JUST MACHINE TAKING ORDERS

SEE MERGE BUTTON

HIT IT

@skjnldsv
Copy link
Contributor Author

ahahahahhaha

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants