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

When the count is set more than 7, the return colors are one less. #24

Open
ynynl opened this issue Dec 5, 2020 · 1 comment
Open

Comments

@ynynl
Copy link

ynynl commented Dec 5, 2020

example:
count: 7 => return 7colors
count: 8 => return 7 colors
count: 30 => return 29 colors

@RinatValiullov
Copy link

@ynynl

If you will set to options.count negative number you will get something like this:

options = {
  count: -1
}

[ "color", "color" ]

options = {
  count: -2
}

[ "color" ]

options = {
  count: -3
}

[  ]

And so one.
Decreasing the number further will also result in an empty array.

It seems to me that the problem is most likely in the packages that this utility uses.
That is chroma.js or get-rgba-palette.
Since I did not see any strange logic in the index.js file of this library.

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

No branches or pull requests

2 participants