jaames / iro.js

🎨 Modular color picker widget for JavaScript, with support for a bunch of color formats

Home Page:https://iro.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Asmor opened this issue · comments

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.

commented

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