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
Allow specifying alpha as a number from 0 to 255 #9
Comments
What's the use-case? I don't see how that can be done with the suggested API as it's ambigious whether |
@sindresorhus A Uint8ClampedArray encodes red, green, blue and alpha as integers from 0 to 255. |
Any suggestions on how the API should look like? |
@sindresorhus We could add an option that changes the behaviour of the alpha parameter. |
Yeah, I guess. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the alpha can only be specified as a decimal or percentage. However, it would be useful if it could be specified as a number from 0 to 255. Conversion back to percentages is:
alpha / 255
cc @sindresorhus
The text was updated successfully, but these errors were encountered: