Displaying colors based on a hue slider?

Discuss Lemur and share techniques.
Post Reply
prismspecs
Newbie
Posts: 3
Joined: 05 Sep 2013 15:11

Displaying colors based on a hue slider?

Post 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?
prismspecs
Newbie
Posts: 3
Joined: 05 Sep 2013 15:11

Re: Displaying colors based on a hue slider?

Post by prismspecs »

Oh and is there any way to embed an image into the interface by chance?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Displaying colors based on a hue slider?

Post 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)
Post Reply