Hi Frank,
The "Prism" algorithm has been integrated in a bigger, upcoming Colors library for NodeBox. That would be the easiest way to work with it.
However, the library is currently undocumented - this might take a while as there is a lot of functionality to explain.
But I've e-mailed you the library in its current state and below is an example of how to get colors from Yahoo. There are some more examples in the download. The library also has a cache of some 3000 colored emotions and adjectives.
How to get colors from Yahoo:
colors = ximport("colors") fairytale = colors.yahoo("fairytale") # Draws the entire scheme. stroke(0.8) fairytale.swatch(10, 10, w=20, h=20, padding=2) # Random colors from the scheme. nostroke() for i in range(10): fill(fairytale.color()) oval(random(100), 300+random(100), 40, 40) # A list of 10 random colors. selection = fairytale.colors(10) x = 0 for clr in selection: fill(clr) rect(175+x, 300, 30, 30) x += 30 # A single swatch in the scheme. hue, shader, weight = choice(fairytale.ranges) print "hue:", hue.name print "shader:", shader.name rotate(45) for i in range(10): fill(shader(hue)) rect(175+i*30, 350, 30, 30)Another technique with good results, as proposed here, is to pick colors from pixels inside an image:
colors = ximport("colors") fish = colors.morguefile("fish") y = 0 for clr in fish: fill(clr) rect(0, y, 40, 40) y += 40You may also want to check out kuler functionality in the Web library.
Best regards,
Tom
I tried mailing you the library but the mail returned undelivered. Will try again. If you have a second e-mail adres, please send it to me.
Mr. S....
Sorry about the email deboggle. If the Colors library is close to release I will wait for it. Thanks for your time and a great program.
Colors (prism) Download
Posted by Frank W Morris on Sep 02, 2007Folks...
I am teaching a class this fall entitled "Fundamentals of Design". I am trying to move this class more and more into the digital world. I have added a section entitled "Algorithmic Design". The software NodeBox and your module Colors presents many possibilities for such a section. I would like to use Colors capabilities to abstract words into color combinations and back. I think this would add greatly to my class and the students understanding of these concepts. While looking at the Colors (Prism) page at the NodeBox web site one is asked to contact you to request the module. I thank you for your consideration and await your response.
Thank You
Frank Morris
Ivytech State College