-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add a fallback.svg
for dynamic fallbacks
#115
Conversation
@danielbachhuber is attempting to deploy a commit to a Personal Account owned by @Kikobeats on Vercel. @Kikobeats first needs to authorize it. |
wow thanks for that, it looks pretty sick! Your current implementation is using it as a provider. I think I like that idea and we can rename it into "identicon" since the fallback query parameter is already implemented. what do you think about generating the color in a pseudo-random way, so the user doesn't need to think about For example, you can generate those value based on the |
Ah, yeah, that'd be a better approach. To confirm, rename my
Do you have an algorithm you'd suggest? I'd like to keep the parameters as options so I can control the color in my app. Oh, another thought: I defaulted to a solid color because I thought that might be nicer than a random gradient. |
We can implement this solution https://github.com/tobiaslins/avatar/blob/master/src/image.js#L9 What do you think:
In that way, we can have a good first impression, but also powerful to customize in case you want 🙂 A variation about the default color be to use just a plain color: https://github.com/Gustu/string-to-color |
I'm amenable to that approach. Where would you like the functions stored, and do you have any other code structure suggestions before I finish this up? |
just renaming it as |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/kikobeats/unavatar/24PJ8nrfPzQEfV1ZB4Gn6QaEYufX |
@Kikobeats Sorry, meant to comment too: this PR is ready. |
Thanks, let me review it quickly 🙂 |
@Kikobeats Still thinking about landing this? |
hmm I'm testing this locally and looks there is a problem related to color transformation
|
See #33
Example usage: