iziToast icon indicating copy to clipboard operation
iziToast copied to clipboard

add alpha option for background color

Open spider4216 opened this issue 4 years ago • 3 comments

Unfortunately I couldn't change opacity for info, success, warning, error and question without system theme changing or create new one witch was the same as system with little alpha changes.

With new field "backgroundOpacity" everyone can change opacity for default theme or any other background color

spider4216 avatar Jan 21 '21 10:01 spider4216

Unfortunately I couldn't change opacity for info, success, warning, error and question without system theme changing or create new one witch was the same as system with little alpha changes.

With new field "backgroundOpacity" everyone can change opacity for default theme or any other background color

Doesn't it work if you choose RGBA format for the color or something like #ffffff33? Where the alpha channel is 33.

serious-angel avatar Jan 21 '21 11:01 serious-angel

Unfortunately I couldn't change opacity for info, success, warning, error and question without system theme changing or create new one witch was the same as system with little alpha changes. With new field "backgroundOpacity" everyone can change opacity for default theme or any other background color

Doesn't it work if you choose RGBA format for the color or something like #ffffff33? Where the alpha channel is 33.

I pushed some fixes:

  • if you choose background colour in HEX format and specify backgroundAlpha option, then hex convert to rgba with alpha
  • if you choose rgb format and specify backgroundAlpha option, then rgb convert to rgba with alpha
  • if you choose rgba and specify backgroundAlpha option, this one will be used
  • if you choose just rgba without backgroundAlpha option, this one will be used
  • Now alpha number replaced via regular expression

spider4216 avatar Jan 22 '21 05:01 spider4216

Should I do something to merge this feature?

spider4216 avatar Jul 17 '21 04:07 spider4216