Skip to content

Instantly share code, notes, and snippets.

@tanqhnguyen
Created June 13, 2012 04:12
Show Gist options
  • Save tanqhnguyen/2921827 to your computer and use it in GitHub Desktop.
Save tanqhnguyen/2921827 to your computer and use it in GitHub Desktop.
l.prototype.routeSpace = function (a, b) {
var c = b[0];
return c === undefined ? this.getValues(a) : (typeof c == "number" && (c = Array.prototype.slice.call(b)), this.setValues(a, c))
}, l.prototype.setValues = function (a, b) {
return this.space = a, this.convs = {}, this.convs[a] = b, this
}, l.prototype.getValues = function (a) {
var b = this.convs[a];
if (!b) {
var c = this.space,
d = this.convs[c];
b = g[c][a](d), this.convs[a] = b
} else e(b);
return b
}, ["rgb", "hsl", "hsv", "cmyk", "keyword"].forEach(function (a) {
l.prototype[a] = function (b) {
return this.routeSpace(a, arguments)
}
}), a.exports = g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment