Skip to content

Color Picker changing the color of the supplied model. #7

@enigmak

Description

@enigmak

When setting the ng-model to certain colors the model value is changed for instance #FAFCFC becomes #34FCFC. This issue also shows up when moving the color picker around the left edge of the color palette. You can see the issue on your demo page by trying to select colors close to the left edge or bottom of the palette.

I fixed this by changing line 95 to

                    var color = tinycolor({h: $scope.hue, s: $scope.saturation/100, v: $scope.lightness/100}),

Not sure if this is a good solution as it seems like the picker has issues on the bottom and far right this way.

You can see the fixed code at, and the fork shows it before it was fixed.
http://plnkr.co/edit/8ZMOABpjn7nEs9c3Z483?p=preview

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions