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

getColorEncoding function has an edge case that makes it falsy #28

Open
safouman opened this issue Dec 18, 2020 · 0 comments
Open

getColorEncoding function has an edge case that makes it falsy #28

safouman opened this issue Dec 18, 2020 · 0 comments

Comments

@safouman
Copy link

Greetings,

in the getColorEncoding function:

if ((c.r + c.g + c.b) && typeof (c.r + c.g + c.b) === 'number')

in the above conditions and its similar in the code if r, g, b are zero rgb(0,0,0) , {r:0,g:0,b:0} the result will be falsy cause 0 && true equals false

would be great to verify the edge cases in each function

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

1 participant