Skip to content

add alpha option for background color#199

Open
spider4216 wants to merge 2 commits intomarcelodolza:masterfrom
spider4216:alpha-background
Open

add alpha option for background color#199
spider4216 wants to merge 2 commits intomarcelodolza:masterfrom
spider4216:alpha-background

Conversation

@spider4216
Copy link
Copy Markdown

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

@serious-angel
Copy link
Copy Markdown

serious-angel commented Jan 21, 2021

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.

@spider4216
Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown

@iamarpitpatidar iamarpitpatidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.

@spider4216
Copy link
Copy Markdown
Author

Should I do something to merge this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants