-
Notifications
You must be signed in to change notification settings - Fork 238
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
Opacity slider #2627
base: develop
Are you sure you want to change the base?
Opacity slider #2627
Conversation
Ideally this would work in both the bitmap and vector editors. Currently, certain tools in the bitmap editor (eg. paint brush and circle tool) don't support alpha. I can either work on implementing those (increasing the surface area of changes in this PR), or limit the new opacity slider to the vector editor. I'm looking into what kinds of changes need to be done to the bitmap tools to support the alpha channel. |
- add allowAlpha props to pass around whether alpha should be allowed - remove transparency if exists when switching to bitmap
Resolves
#834
Proposed Changes
Adds a slider to the colour picker to change the opacity of colours + all the necessary plumbing to make it work
Screen.Recording.2024-06-26.at.11.17.36.mov
parse-color
from npm is unmaintained, and returns inconsistently. Hex colours like #00ffb9 have an alpha of 1, and rgba output ranges from 0-1, but for hex with the alpha part (eg. #00ffb9de) the scale is from 0-255Screen.Recording.2024-06-26.at.11.18.49.mov
Reason for Changes
Adds functionality to the paint editor that was previously difficult, introduces new users to the concept of colour transparency, etc.
Test Coverage
TODO