When adding a binding with an initial value of a hex string with 3 or 6 digits (no alpha portion), the controller does not add an alpha slider.
const PARAMS = {
tint: '#ff0',
};
pane.addBinding(PARAMS, 'tint', {
view: 'color',
color: { alpha: true },
});
I would expect declaring { alpha: true } to always add a supporting alpha slider. As a workaround, you can add the alpha portion to the hex string.
| input |
has alpha slider |
| '#fff' |
❌ |
| '#ffffff' |
❌ |
| '#fffc' |
✅ |
| '#ffffffcc' |
✅ |
| 0xfff |
✅ |
| 0xffffff |
✅ |
When adding a binding with an initial value of a hex string with 3 or 6 digits (no alpha portion), the controller does not add an alpha slider.
I would expect declaring
{ alpha: true }to always add a supporting alpha slider. As a workaround, you can add the alpha portion to the hex string.