sefianecho / alwan

A simple, lightweight, customizable, touch friendly color picker, written in vanilla javascript with zero dependencies.

Home Page:https://sefianecho.github.io/alwan/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transparent input when initial color is black and opacity is false

nbluis opened this issue · comments

Hi.

I'm working upgrading an project that is using 1.4 version of Alwan to latest version 2.0.4. It looks like I found a bug that emerged since version 2.0.0.

When the Alwan object is initialized with color: '#000000' along with the option opacity: false the selector becomes transparent instead of black. When opacity: true everything works properly.

const alwan = new Alwan('#reference', {
  color: '#000000',
  opacity: false
});

image

I made some examples in jsfiddle using distinct lib versions to demonstrate the problem.

Version 1.4 - Working
https://jsfiddle.net/0zL6ucp9/1/

Version 2.0.0 - Not Working
https://jsfiddle.net/thq2Lgrs/

Version 2.0.4 - Not Working
https://jsfiddle.net/thq2Lgrs/1/