How do I find the rgb values for colors defined by their name: e.g. blue, green, yellow etc.
pete at lcsql.com
Mon Dec 9 20:10:19 EST 2013
Sent this earlier but it didn't make it for some reason. This is a
function that some kind person on the list gave me a while back:
*function* RGBFromColorName theColor
* if* theColor is not a color *then* *return* "Error: not a color"
*create* invisible button
*if* the result is not empty *then* *return* "Error"
*set* the backgroundColor of last button to theColor
*set* the backgroundPixel of last button to the backgroundPixel of last
*get* the backgroundColor of last button
*delete* last button
lcSQL Software <http://www.lcsql.com>
On Mon, Dec 9, 2013 at 4:43 PM, James Hurley <jhurley0305 at sbcglobal.net>wrote:
> But Keven ,
> if the set is “blue”
> then the Put is “blue”
> How can for the Put into rgb?
> n Dec 9, 2013, at 4:30 PM, James Hurley wrote:
> > The subject says it all.
> I think the only option is to set one of the color properties of an object
> to a named color, then examine the value of that property.
> set the backgroundColor of grc "foo" to aquamarine
> put the backgroundColor of grc "foo"
> Devin Asay
> Learn to code with LiveCode University
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode