-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Random color with Placeholdit #1179
Random color with Placeholdit #1179
Conversation
7df1ec3
to
f021fa1
Compare
@vbrazo Hey, do you expect something from me? I notice you assign the merge to me. |
f021fa1
to
23cac99
Compare
@vbrazo I didn't notice the conflicting files. I guess it was the reason of the assignment. I resolved it. |
Pull Request Test Coverage Report for Build 2143
💛 - Coveralls |
23cac99
to
059ad30
Compare
Could you also update the |
|
||
def generate_color | ||
format('%06x', (rand * 0xffffff)) | ||
end |
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.
I'm not sure why we need this private method since only one part of the system is using it.
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.
I did it because I need this peace of code twice in image
method. But I could call it directly in the main method.
It's also to have a lighter method.
Let me know if you want I move it inside image
method directly.
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.
Let's leave it how it looks and we can refactor in the future if needed.
If :random given as value for background_color or text_color in Placeholdit module, it will generate a random hex color.
ab6f0b1
to
bfaa247
Compare
Looks good. Thanks for contributing 🥇 |
* Add option to use random color for Placeholdit If :random given as value for background_color or text_color in Placeholdit module, it will generate a random hex color. * Update Placeholdit documentation * Update Changelog
Add option on Placeholdit module to generate random color for
text_color
andbackground_color
.