Tkinter color names/codes
Cameron Laird
claird at lairds.com
Fri Jan 23 12:36:50 EST 2004
In article <Xns9478E236A5D3Fjseale18insightbbcom at 204.127.204.17>,
Jeff Seale <jseale18 at insightbb.com> wrote:
>Nuff Said <nuffsaid at phreaker.net> wrote in
.
.
.
>> http://wiki.tcl.tk/8606
>> - list with all named colors in Tcl/Tk
>>
>> http://wiki.tcl.tk/colors
>> - W3C names, hex codes and Tcl/Tk names for the
>> 16 HTML 3.2 colors (i.e. the basic VGA set)
>>
>> HTH / Nuff
>>
>
>Is it possible to translate all those colors into their #hex combinations?
>The ones I know about already are Red #FF0000, Yellow #FFFF00, Green #
>00FF00, Cyan #00FFFF, Blue #0000FF, Magenta #FF00FF, White #FFFFFF and
>Black #000000.
I'm not sure what you're asking. The references do just
that, in several variations, although they're coded in
Tcl/Tk, rather than Tkinter. Do you realize you can type
$ python
Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> l = Tkinter.Label()
>>> l.winfo_rgb("red")
(65535, 0, 0)
>>>
yourself?
--
Cameron Laird <claird at phaseit.net>
Business: http://www.Phaseit.net
More information about the Python-list
mailing list