Skip to content

Commit 3cee42d

Browse files
committed
Fixing #7 - occasional incorrect colours when typing in
1 parent 10302ad commit 3cee42d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/01-simple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1>AngularJS Color Picker</h1>
6969

7070
<div class="row">
7171
Two Way Binding
72-
<color-picker ng-model="color"></color-picker>
72+
<!-- <color-picker ng-model="color"></color-picker> -->
7373
{{color}}
7474
</div>
7575

lib/scripts/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
};
7878

7979
$scope.update = function () {
80-
var color = tinycolor({h: $scope.hue, s: $scope.saturation, v: $scope.lightness}),
80+
var color = tinycolor({h: $scope.hue, s: $scope.saturation / 100, v: $scope.lightness / 100}),
8181
colorString;
8282

8383
if ($scope.config.alpha) {

0 commit comments

Comments
 (0)