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
Improved color generator and fix #300 #306
Conversation
By analyzing the blame information on this pull request, we identified @Henni to be a potential reviewer |
Current coverage is
|
Please add Screenshots before and after. THX a lot |
49621cf
to
d40a1ce
Compare
Okay, I managed to get something much more usable: @DeepDiver1975 The colors are the same, I just changed the way the script transform the hash into a 0-360 int, so it has better random "distribution" |
I like these graphs! |
Hum, I can try @Henni! English not my main language but whatever! :) The uuid system uses md5 which already is correctly distributed see here, someone already did the job At first i tried separating every char of the hash and converting form base16 to base10. Adding it up alltogether and dividing by the max we could get (32*16, md5 has 32char). I decided to set up a formula that isn't mathematically logic, because I don't sum the base16 to 10. I convert the result to string and concatenate them, so 15+16 = 1516 and not 31. Then I just had to use the formula to convert rgb to hsl and retrieve the hue variable from the hsl. |
I'm sure the algorithm can be improved, but hey, do we really need a perfect colour generator? X) |
New generator based on the same color tones Fix #300 Only keep numbers and a-f letters used in uids
8c809c6
to
7db0e6a
Compare
We should probably cancel this PR and wait for this to be merged: owncloud/core#23638 After we should update our templates to use the |
unit tests would be great to improve code coverage |
I'm closing this because we need to use the core function. |
Better colors randomisation.