Skip to content

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

Description

@safouman

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions