diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-04-28 13:28:55 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-04-28 18:26:14 +0200 |
commit | 32af48e442a960b8c3f199f5ffad28a34590fcda (patch) | |
tree | c291cb97627bd2cfb65167347261d5ef8f521bfd /data/lib/color.js | |
parent | 2382ba19afc84e9b747a7981ebf72aaa704f08b6 (diff) | |
download | bugzilla-triage-32af48e442a960b8c3f199f5ffad28a34590fcda.tar.gz |
Reformatting to MoFo coding style
Diffstat (limited to 'data/lib/color.js')
-rw-r--r-- | data/lib/color.js | 60 |
1 files changed, 40 insertions, 20 deletions
diff --git a/data/lib/color.js b/data/lib/color.js index 163071e..4d0c41f 100644 --- a/data/lib/color.js +++ b/data/lib/color.js @@ -51,10 +51,13 @@ Color.prototype.toString = function() { * Converts an RGB color value to HSL. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSL_color_space. Assumes r, g, and b are * contained in the set [0, 255] and returns h, s, and l in the set [0, 1].4343 - * - * @param Number r The red color value - * @param Number g The green color value - * @param Number b The blue color value + * + * @param Number + * r The red color value + * @param Number + * g The green color value + * @param Number + * b The blue color value * @return Array The HSL representation */ Color.prototype.hsl = function() { @@ -84,17 +87,22 @@ Color.prototype.hsl = function() { h /= 6; } - return [ h, s, l ]; + return [ + h, s, l + ]; }; /** * Converts an HSL color value to RGB. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are * contained in the set [0, 1] and returns r, g, and b in the set [0, 255]. - * - * @param Number h The hue - * @param Number s The saturation - * @param Number l The lightness + * + * @param Number + * h The hue + * @param Number + * s The saturation + * @param Number + * l The lightness * @return Array The RGB representation */ Color.prototype.hslToRgb = function(h, s, l) { @@ -130,17 +138,22 @@ Color.prototype.hslToRgb = function(h, s, l) { b = hue2rgb(p, q, h - 1 / 3); } - return [ r * 255, g * 255, b * 255 ]; + return [ + r * 255, g * 255, b * 255 + ]; }; /** * Converts an RGB color value to HSV. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSV_color_space. Assumes r, g, and b are * contained in the set [0, 255] and returns h, s, and v in the set [0, 1]. - * - * @param Number r The red color value - * @param Number g The green color value - * @param Number b The blue color value + * + * @param Number + * r The red color value + * @param Number + * g The green color value + * @param Number + * b The blue color value * @return Array The HSV representation */ Color.prototype.hsv = function() { @@ -171,17 +184,22 @@ Color.prototype.hsv = function() { h /= 6; } - return [ h, s, v ]; + return [ + h, s, v + ]; }; /** * Converts an HSV color value to RGB. Conversion formula adapted from * http://en.wikipedia.org/wiki/HSV_color_space. Assumes h, s, and v are * contained in the set [0, 1] and returns r, g, and b in the set [0, 255]. - * - * @param Number h The hue - * @param Number s The saturation - * @param Number v The value + * + * @param Number + * h The hue + * @param Number + * s The saturation + * @param Number + * v The value * @return Array The RGB representation */ Color.prototype.hsvToRgb = function(h, s, v) { @@ -226,7 +244,9 @@ Color.prototype.hsvToRgb = function(h, s, v) { break; } - return [ r * 255, g * 255, b * 255 ]; + return [ + r * 255, g * 255, b * 255 + ]; }; /** |