angular-minicolors
angular-minicolors copied to clipboard
add support for angular opacity and rgba scope bindings, to work with op...
...acity minicolors picker - bump to 0.0.7
Hi Kai,
this is an update that binds scope variables to the rgba and opacity values that are set when you use minicolors with {opacity:true}.
in your version 0.0.6, all you can get out of it is the HEX value, now you can get both the rgba(155,155,23,0.5) and the opacity value, or either.
I've also updated the gh-pages branch with a demo if you want to check it out.
Thanks, Jon
@kaihenzler You still alive buddy ?
Hey there, I was in vacation. Sorry for Not responding. I will take a look at your PR tomorrow. I'm Not sure if i like that you added 2 more Attribute or if we should use the ng-model to represent the color value including the opacity... I will think about it and tell you about it in this thread. Thanks a Lot that you like this directive And you did contribute to it!
Kind regards, Kai
I thought about it and I think we should go the way you implemented the new features.
I pushed a commit in the development branch. I changed the prefix of the attribute names from 'ng' to 'minicolors'. Would you mind checking out the development branch and take a look at it?
The new Usage would be:
<input minicolors="opacitysettings"
minicolors-rgba="color.opacityRgba"
minicolors-opacity="color.opacityVal"
ng-model="color.opacityHex">
Thanks, Kai
I tried out this change. I wanted 2-way binding on my model, an RGBA string. Looks like you're still required to bind the hex value to a model, and you cannot set the input's value from an RGBA string; RGBA is a read-only value.