Message: 16
Date: Fri, 03 Jul 2009 14:05:15 -0700
From: Scott Rossi <[email protected]>
Subject: Re: RGB valuesfor a color name
To: Revolution Mail List <[email protected]>
Message-ID: <c673c09b.42e89%[email protected]>
Content-Type: text/plain;       charset="US-ASCII"

Recently, James Hurley wrote:

I'm surprise that mouseColor is the only function that returns the RGV
values of named colors.

This is the way I do it (requires an object). Starting with a graphic, for
example:

set the backColor of grc 1 to <colorname>
set the backPixel of grc 1 to the effective backPixel of grc 1
get the backcolor of grc 1

Not sure why it works, but it does for me.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design



Scott,

Thanks for this. It is easier than using the pencolor, even if it does require a preexisting object. It seem particularly appropriate that an object carrying the color "WhiteSmoke", for example, should exist before being defined by its RGB values.

In an effort to probe the mysteries of "backpixel" and "effective backPixel" I included a couple of extra lines of code:

      put the backPixel of grc tName into tempBack
      put the effective backPixel of grc tName into effectiveTempBack
set the backPixel of grc tName to the effective backPixel of grc tName

I discovered that tempBack and effectiveTempBack are the same and, in this instance, equal to 16711680.

And so it is with all existential questions that they be mysterious: "In the beginning was the engine, and the engine was with Scott (Rainey)"

Jim Hurley _______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to