1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Difficulties with color matching

Posted by Mattijs on Dec 11, 2007



When i'm picking a color in illustrator and try to get the same color out of nodebox i end up with a different one.
In the image- example i choose the color orange with the HSB value of H 30 S 100 B 100.

In nodebox i've set the colormode to HSB en the colorvalue to (0.3, 1, 1) and it returns a green color.

Can anybody explain what i'm doing wrong?

Thanks.
Mattijs


 
Posted by Tom De Smedt on Dec 11, 2007

Hi Mattijs,

Illustrator measures hue in degrees, between 0 and 360, and saturation and brightness in percentages, between 0 and 100. NodeBox measures both H, S and B between 0.0 and 1.0. So it should not be 0.3 but 30 / 360 = 0.083

colormode(HSB)
c1 = color(30.0/360, 1, 1)
Note that I use 30.0 and not 30, which lets NodeBox know you want a floating point number.



Posted by Mattijs on Dec 11, 2007

Aaah, now I get. Previously i also encountered problems with the RGB color mode because i didn't knew how to translate the 255 value into a valid nodebox value.
Its working now.
Thanks alot

Is there also going to be a HEX value support into nodebox?