Question

I'm a bit confused by implementation ambiguities - for instance rotating the hue wheel by 180 degrees "feels" right for getting a complementary color, but at the same time Adobe Kuler produces identical output for both dark and light shades of the "seed" color. I'm not sure if this is a bug/feature of the Adobe tool specifically, or a chapter of color theory that I've missed completely.

Is there a js library (or one portable from a different language) that adheres to "reference" formulas for calculation of such related color palettes? I am referring to "conventional" analogous, complementary, compound etc. palettes.

Edit: to avoid treating this as "off-topic", I'm seeking a javascript implementation - but will accept answers in other languages or formulas/reference sufficient to build one from scratch.

Was it helpful?

Solution

Dojo has a module that seems to do a lot of what you are looking for: http://dojotoolkit.org/reference-guide/1.9/dojox/color/Palette.html

If you want to use it standalone you might have to create a "build" to get one js file since Dojo has a little bit of scaffolding for their require()'s and stuff like that. Or you can have a look at the source: https://github.com/dojo/dojox/tree/master/color .

If needed I can instruct a bit on creating a dojo build for this.

OTHER TIPS

If nodejs is desirable, then how about using something like this: https://github.com/visionmedia/palette

Then you could open a websocket: http://einaros.github.io/ws/

or simply just run a server to enable connecting to your new palette application from another language, if thats what you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top