Those Impressive NodeBox Colors

December 4th 07:26
by why

I originally neglected the new Colors library for NodeBox since, well, you know, what could be so great about a library focused only on mixing colors? For some reason I thought it was a module that only allowed people to use verbose color names like periwinkle and burnt umber. And, well, yeah. But, no no, not hardly. The Colors library mandates a whole whirlpool of color concepts, it’s quite a brilliant library.

I’m talking about commands like range which describes a certain crossection of the rainbow. You can then randomly select colors from the range. Or pull a color’s complementary. Or build a drop shadow or lighting effect from the color. And, beyond that, you can group set of color ranges into a theme.

This simple color range code pulls out the nice random sampling of hues you see depicted:

r = colors.range(h=(0,0.2))
transform(CORNER)
rotate(45)
for i in range(HEIGHT/10):
  fill(choice(r))
  rect(-WIDTH, i*15, WIDTH*2, 20)

And the thing with themes is that this library comes packaged with thousands of color themes extracted from Yahoo search results based on simple queries.

So, yeah, this is just more sensational work from Tom De Smedt. I don’t think there’s been a colors library in the history of mankind that touches this. To the moon.

4 comments

Hank

said on December 4th 07:47

Wow. That rocks.

Evan Farrar

said on December 4th 13:35

That prism algorithm blows me away. It’s like they have made a previously inexpressible concept an easy concrete thing that non-design types like me can do no problem. Design for the people! or robots!

she

said on December 4th 14:05

whoa
never saw that before

cool thing, is that available for use in ruby too?

dgurba

said on December 4th 15:04

very nice :D

Comments are closed for this entry.