Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add alpha option for background color #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spider4216
Copy link

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

@artshade
Copy link
Contributor

artshade 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
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

@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
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