Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clipped degrees to 0-360, so you can give a range from -360 to like, …

…a lot, and you get the right color.
  • Loading branch information...
commit 4d34549bf01a43d820e14f4f22b060db6bf71cb9 1 parent d8d6ea8
@davebalmer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  hsv.js
View
2  hsv.js
@@ -2,7 +2,7 @@ hsvtorgb = function(h, s, v) {
if (s == 0)
return format(v, v, v);
- h /= 60;
+ h = ((h + 360) % 360) / 60;
var i = Math.floor(h);
var f = h - i;
Please sign in to comment.
Something went wrong with that request. Please try again.