Skip to content
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

Merged
merged 1 commit into from
Apr 7, 2016
Merged

Updated color generator #23768

merged 1 commit into from
Apr 7, 2016

Conversation

skjnldsv
Copy link
Contributor

@skjnldsv skjnldsv commented Apr 4, 2016

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.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @rullzer, @Kondou-ger and @MorrisJobke to be potential reviewers

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Apr 4, 2016

@MorrisJobke MorrisJobke added this to the 9.1-current milestone Apr 6, 2016
@MorrisJobke
Copy link
Contributor

Tested and works 👍

cc @owncloud/designers

@jancborchardt
Copy link
Member

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];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2016-04-06_19-01-00

Copy link
Member

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

@skjnldsv skjnldsv force-pushed the skjnldsv-color-generator-edit branch from 840fc30 to a2c730e Compare April 6, 2016 17:33
Separated the main function to allow special use without dom manipulation.
@skjnldsv skjnldsv force-pushed the skjnldsv-color-generator-edit branch from a2c730e to 28571e6 Compare April 6, 2016 17:36
@LukasReschke
Copy link
Member

👍

@DeepDiver1975
Copy link
Member

What about some unit tests?

@skjnldsv
Copy link
Contributor Author

skjnldsv commented Apr 7, 2016

This function is already tested in the avatar test I think :)

@lock
Copy link

lock bot commented Aug 6, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
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.

6 participants