summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/MochiKit/Color.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/MochiKit/Color.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/MochiKit/Color.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/frontend/gamma/js/MochiKit/Color.js b/frontend/gamma/js/MochiKit/Color.js
index 27dc2d0..f2a0f67 100644
--- a/frontend/gamma/js/MochiKit/Color.js
+++ b/frontend/gamma/js/MochiKit/Color.js
@@ -9,5 +9,5 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
9***/ 9***/
10 10
11MochiKit.Base._module('Color', '1.5', ['Base', 'DOM', 'Style']); 11MochiKit.Base.module(MochiKit, 'Color', '1.5', ['Base', 'DOM', 'Style']);
12 12
13/** @id MochiKit.Color.Color */ 13/** @id MochiKit.Color.Color */
@@ -113,5 +113,5 @@ MochiKit.Color.Color.prototype = {
113 /** @id MochiKit.Color.Color.prototype.isLight */ 113 /** @id MochiKit.Color.Color.prototype.isLight */
114 isLight: function () { 114 isLight: function () {
115 return this.asHSL().b > 0.5; 115 return this.asHSL().l > 0.5;
116 }, 116 },
117 117
@@ -642,17 +642,8 @@ MochiKit.Base.update(MochiKit.Color, {
642 }; 642 };
643 643
644 var makeColor = function (name, r, g, b, a) {
645 var rval = this.fromRGB(r, g, b, a);
646 this[name] = function () { return rval; };
647 return rval;
648 };
649
650 for (var k in colors) { 644 for (var k in colors) {
651 var name = k + "Color"; 645 var name = k + "Color";
652 var bindArgs = m.concat( 646 var value = this.Color.fromRGB.apply(this.Color, colors[k]);
653 [makeColor, this.Color, name], 647 this.Color[name] = m.partial(m.operator.identity, value);
654 colors[k]
655 );
656 this.Color[name] = m.bind.apply(null, bindArgs);
657 } 648 }
658 649