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

request: randomly generate colors if param count is > number of colors passed to param colors #4

Closed
jalavosus opened this issue Apr 26, 2022 · 1 comment · Fixed by #5

Comments

@jalavosus
Copy link
Contributor

Specifically, only do this if both parameters are explicitly passed by the user, ie:

  • ?colors=0b486b -> only use Astronaut Blue, since count was not explicitly passed
  • ?count=4&colors=0b486b -> use Astronaut Blue and randomly generate three extra colors

I can do up a PR for this if it's something which makes sense to add :)

Love this project by the way, going to be using it in quite a few places.

jalavosus added a commit to jalavosus/reptiles.dev that referenced this issue Apr 26, 2022
If both `count` and `colors` parameters are passed, but length of
`colors` is less than `count`, randomly generate extra colors to satisfy
the desired color count.
@TimMikeladze
Copy link
Owner

This would be useful to have.

Thank you for the recent PRs and your interest in this project.

jalavosus added a commit to jalavosus/reptiles.dev that referenced this issue Apr 26, 2022
If both `count` and `colors` parameters are passed, but length of
`colors` is less than `count`, randomly generate extra colors to satisfy
the desired color count.
TimMikeladze added a commit that referenced this issue Apr 26, 2022
feat(generator): implement fix(?) for issue #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants