Closed ashthespy closed 7 years ago
@ashthespy I will add a raw
format option which will pass back the tinycolor object which you can do as you please
Consider this under the label 'Help Wanted'
I would like to adjust the lightness
via an external slider while maintaining a two way binding between the slider and the actual color object.
Currently, I have setup two watches (one for the slider, one for the color object) to update each other. However, this leads to recursive updating. Any suggestions be to avoid the recursive updates? Plunker
This is one of the big reasons I generally try to avoid using $watch
. See my Plunker using onChange
events for both the slider and the color picker.
Side Note: There must be a bug in the color picker that requires the use of $scope.$applyAsync()
in this plunker. I have created another ticket to investigate this.
I have released the raw
format option in v3.0.0
Would it be possible to directly get individual
r
,g
,b
orhue
,saturation
,lightness
values? I currently re-parsing the$scope.color$
but am wondering what the right way to achieve this would beEDIT: Please don't bother, forked and added a
rawHsl
format option and passed thetinycolor.toHsl()
object directly. PS: quick hacky work - a0d5d3776b2cc4b552884ecfe1d8004fd6a33182