This is a Mootools-like class implementation for jQuery in just 37 NCLOC.
var Egg = new $.Class({
var Color = function() { | |
this.r = this.g = this.b = 0; | |
this.h = this.s = this.l = 0; | |
this.a = 1; | |
}; | |
/** RGB */ | |
Color.prototype.cssRGB = function() { | |
return "rgb("+Math.round(255*this.r)+","+Math.round(255*this.g)+","+Math.round(255*this.b)+")"; | |
}; | |
Color.prototype.cssRGBA = function() { |