From a1cbd53e23054f9d190514b7dc2867b163a6a887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 2 Jun 2011 15:33:46 +0100 Subject: [PATCH] Use modulo again in hsb conversion. --- src/color/Color.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/color/Color.js b/src/color/Color.js index 3629a7f1..e9053b5d 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -98,7 +98,7 @@ var Color = this.Color = Base.extend(new function() { }, 'hsb-rgb': function(color) { - var h = color._hue / 60, // Scale to 0..6 + var h = (color._hue / 60) % 6, // Scale to 0..6 s = color._saturation, b = color._brightness, i = Math.floor(h), // 0..5