jaames / iro.js

🎨 Modular color picker widget for JavaScript, with support for a bunch of color formats
https://iro.js.org
Mozilla Public License 2.0
1.3k stars 81 forks source link

Alpha channel not kept when creating a new iro Color object based on an existing one #193

Closed Asmor closed 3 years ago

Asmor commented 3 years ago

In the screenshot below, foo is an iro Color object created by passing in the string rgba(0,0,0,0). foo's alpha channel is correctly set to 0. bar is an iro Color object created by passing in foo. 'bar`'s alpha channel is 1.

image

Here's another screenshot demonstrating that the color channels are being copied correctly, it's only the alpha channel having the issue.

image

I can also confirm the issue is not unique to objects created with rgba strings; I had the same results using e.g. #ffffff00.

jaames commented 3 years ago

sorry for the wait on both of these! should be fixed now :)