Blank Colt wrote:
> 
> Hey all,
> 
> I'm working on a project in D8.0 in which I need to
> gain the individual values of a pixel in the their
> respected R,G,B components, from each pixel on a
> 640x480 member. I am using the getPixel command to
> pull the combined RGB value. What I would like to know
> is, what type of varible or object is the result?:
> 
> vColor = rgb( 123, 234, 45 )
> 
> I have tried to use the getAt to remove items from the
> list. But to no avail. I came up with a crude way to
> parse out the values by converting the above to aq
> string and ripping off the forward and back chars and
> using item delimitation. Like below.
> 
> vColor = rgb( 123, 234, 25)
> vColor = string(vColor)
> vCountChar = vColor.char.count
> delete vColor.char[vCountChar-1..vCountChar]
> delete vColor.char[1..5]
> vRed = value(vColor.item[1])
> vGreen = value(vColor.item[2])
> vBlue = value(vColor.item[3])
> 
> Now I am able to do calulations with the different
> components.
> 
> What I am looking for is a quicker way, and I think it
> exists. When I type the words, red, green, blue; they
> become hot, like commands, yet I can't find any
> documentation on them. Can anyone help? Thanks.

In D7:
On a whim I tried this and it worked:

color = rgb(23,34,54)
put color.green
-- 34
put color.red
-- 23
put color.blue
-- 54


-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to