RGB values for a color name
Richmond Mathewson
richmondmathewson at gmail.com
Fri Jul 3 15:25:51 EDT 2009
Here we go:
Clunky, but it works (err, that's my methodology):
Make a stack; create a graphic (from the drop-down menu), call it "KOLOR".
Populate a text field "KNAMES" with colorNames:
put the colorNames into fld "KNAMES"
make two other flds:
"fRGB" and "SELECT"
(sorry about the screwy names, but was working at speed)
bung this code in the script of the text field filled with the colorNames:
on mouseDown
get the clickText
put the clickText into fld "SELECT"
set the backgroundColor of grc "KOLOR" to the clickText
put the colors of grc "KOLOR" into fld "fRGB"
end mouseDown
Bob's your uncle!
And if that's too much bother, I've just uploaded all that here:
http://mathewson.110mb.com/FILEZ/COLORNAMER.rev.zip
at a 4 KB download it shouldn't hurt too much!
Love, Richmond.
James Hurley wrote:
> How do I translate a color name (Blue1 for example) into its RGB
> values? Programatically.
>
> Jim Hurley
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list