webdesserts / alchemist-js

The extensible color library
https://webdesserts.gitbooks.io/alchemist-js/
MIT License
11 stars 2 forks source link

Don't define conversion methods on object creation #9

Closed webdesserts closed 9 years ago

webdesserts commented 9 years ago

Right now, we define all of a color's conversion methods each time we instantiate a Color. This probably won't be good for performance. Look into whether it is worth creating Color Space specific constructors that inherit from Color.

webdesserts commented 9 years ago

This was fixed in 0e285ae15af4362 by creating custom Color objects for each color space. Right now these are created on the fly, I would like to have them stored on the color space itself. But that's another issue.