08-01-2012 11:37 PM
Hello guys. I am working on a project that needs to express a numerical value ,ranging from 0~1, as a color indicator on front pannel.
The color ramp can be controlled by users. I tried the intensity graph and it worked well.
Now I want to extract the RGB value of the color shown on the intensity graph, ans use them to control an actual RGB LED.
Any ideas to achieve this?
I attached my program, thanks.
08-02-2012 02:32 AM - edited 08-02-2012 02:37 AM
Hi bdtofu,
You already have an array of colors&values.
You need to:
- pick the two colors that are next to your current value.
- split both colors into their RGB parts.
- interpolate each color part for your current slide value
- build a color from the RGB parts and show the color using a color box (instead of a LED)...
Just to give an idea for the first two steps: