Page 1 of 1

Displaying colors based on a hue slider?

Posted: 05 Sep 2013 15:14
by prismspecs
Hey there,

Adding a ball bounce that acts as a hue, saturation, value 2-d grid. I'd like to have an LED or something on screen that can react and tell me what color I'm looking at. So I guess my question is how can I extract X and Y values from the ball location and use this to script the color of an object. I'm happy to do the heavy lifting on the x, y -> HSV, but how do I manipulate the color of an object in real time?

Re: Displaying colors based on a hue slider?

Posted: 05 Sep 2013 15:15
by prismspecs
Oh and is there any way to embed an image into the interface by chance?

Re: Displaying colors based on a hue slider?

Posted: 06 Sep 2013 08:14
by Softcore
To change the color of an object you use its related attribute as referenced in the Lemur manual - specifically for LED for example, page 100, color attribute...

So the script would be:

setattribute(LED, 'color', {integer, integer});

or

setattribute(LED, 'color', {HSV(h,s,v), HSV(h,s,v)});

(not sure about this last one, I'd have to check it out, but you get the idea)