-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
Change hex to rgba when alpha is changed #219
Labels
question
Further information is requested
Comments
You could listen for the |
It means: // pickr is your instance.
pickr.on('change', function( color ) {
if ( color.a === 1 ) {
pickr.setColorRepresentation('HEX');
} else {
pickr.setColorRepresentation('RGBA');
}
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible for a the picker to start with a hex value and then change to rgba when the alpha is changed?
E.g. the pickr starts off as #ffffff but the alpha is changed to .8 so now the pickr displays it as rgba(255, 255, 255, .8)
The text was updated successfully, but these errors were encountered: