How do I find the rgb values for colors defined by their name: e.g. blue, green, yellow etc.

Peter Haworth pete at lcsql.com
Mon Dec 9 19:14:57 EST 2013


Here's 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
button



   *get* the backgroundColor of last button



   *delete* last button

   *return* it



*end* RGBFromColorName

Pete
lcSQL Software <http://www.lcsql.com>


On Mon, Dec 9, 2013 at 3:30 PM, James Hurley <jhurley0305 at sbcglobal.net>wrote:

> The subject says it all.
>
> Thanks.
>
> Jim
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list