Skip to content

hex to rgb has bug when rgb format is #RGBA #5

@hamid814

Description

@hamid814

I was using the function to convert four value hex to rgba, and when i use a non-valid value for alpha of hex, it returns 0.6 for alpha in rgba...

pSBC(0, '#6c9s', 'c' , true) // returns rgba(0,102,204,0.6)
's' is not a valid parameter, but function renders it anyway. also tried other non-valid params like 'q' instead if 's', they worked too

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions