claviska / jquery-minicolors

jQuery MiniColors Plugin
MIT License
956 stars 312 forks source link

Allow for a 0 alpha value in a swatch #261

Closed malissa closed 6 years ago

malissa commented 6 years ago

Bug: When creating a swatch, if the rgba alpha value is 0, the span.minicolors-swatch-color element is styled with a background color that leaves off the alpha.

Solution: In the parseRgb function, check for the presence of rgba[3] using undefined, otherwise 0 will trigger false.

claviska commented 6 years ago

Thanks for fixing this, and also for the code quality repairs! 👍