1

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.

Community
  • 1
  • 1
Oleg
  • 24,465
  • 8
  • 61
  • 91
  • Adobe Kuler is doing that because it lets you change the brightness of the complements individually. The "wheel" adjusts the entire palette based on the selected color, not just the color on the left. It's just their implementation. Play around with it some more. – Radiodef Jan 24 '14 at 00:49
  • 1
    "definitive guide or reference formulas for calculation of "related" color palettes?" sounds way too much like a reference request. I'll vote to leave open, but can you reformulate that? – John Dvorak Jan 25 '14 at 05:02
  • @JanDvorak: good point, thank you, I haven't realized it sounded this way – Oleg Jan 28 '14 at 00:37

2 Answers2

3

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.

Jan Misker
  • 2,129
  • 16
  • 26
  • Looks very promising (even though the example on the dojotoolkit page doesn't run for me in their sandbox). Thanks for the instruction offer, that's quite a bit out of scope for the question but I'll take a good RTFM link though :) – Oleg Jan 30 '14 at 23:07
  • 1
    :) here's your rtfm link for creating dojo builds http://dojotoolkit.org/documentation/tutorials/1.9/build/ You'll want to create one layer that includes only dojox.color.Palette, the build system will build all required modules into it. – Jan Misker Feb 03 '14 at 19:46
0

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.

Adam Spence
  • 3,040
  • 1
  • 21
  • 17
  • This is a bit different from what I'm after, rather then generating a palette from a "seed" colour, it's extracting a palette from an image. See @JanMisker's answer. – Oleg Jan 30 '14 at 23:09