-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Updated color generator #23768
Updated color generator #23768
Conversation
By analyzing the blame information on this pull request, we identified @rullzer, @Kondou-ger and @MorrisJobke to be potential reviewers |
Tested and works 👍 cc @owncloud/designers |
This rather calls for a review from @owncloud/javascript folks. |
var hue = parseInt(hsl[0] * 360); | ||
this.css('background-color', 'hsl('+hue+', '+sat+'%, '+lum+'%)'); | ||
return [parseInt(hsl[0] * 360), sat, lum]; | ||
} |
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.
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.
LOL, at least now you’re honest. ;D
840fc30
to
a2c730e
Compare
Separated the main function to allow special use without dom manipulation.
a2c730e
to
28571e6
Compare
👍 |
What about some unit tests? |
This function is already tested in the avatar test I think :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Separated the main function to allow special use without dom manipulation.
Because the imageplaceholder function include css styling and dom manipulation, we might want to only convert a hash to HSL for some different uses than avatars. (like the contact header for example)
This PR separated the functions and created a new one allowing devs to use the
"a6741a86aded5611a8e46ce16f2ad646".toHsl()
function and get the raw hsl parameters.