Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcl and 'winfo rgb'

25 views
Skip to first unread message

Matthias Meier

unread,
Mar 18, 2011, 9:04:16 AM3/18/11
to
Hello,

as far as i know the wish can't be startet without an display.

To convert tcl-colors to html-colors i use

eval format "#%04x%04x%04x" [winfo rgb . seagreen]

How can this be done in 'batch-mode' (without an display)
Is ther a tcl-way to do this?


Thanks, Matthias

jr

unread,
Mar 18, 2011, 12:04:15 PM3/18/11
to

can you not simply use the values in 'rgb.txt' directly?

Robert Heller

unread,
Mar 18, 2011, 1:30:21 PM3/18/11
to
At Fri, 18 Mar 2011 09:04:15 -0700 (PDT) jr <jr4...@gmail.com> wrote:

>
> On Mar 18, 9:04=A0am, Matthias Meier <Me...@FuH-E.de> wrote:
> > Hello,
> >
> > as far as i know the wish can't be startet without an display.
> >
> > To convert tcl-colors to html-colors i use
> >

> > =A0 =A0 =A0 =A0 eval format "#%04x%04x%04x" [winfo rgb . seagreen]


> >
> > How can this be done in 'batch-mode' (without an display)
> > Is ther a tcl-way to do this?
> >
> > Thanks, Matthias
>
> can you not simply use the values in 'rgb.txt' directly?

Note: if X11 is not installed (eg on a server) rgb.txt won't exist.

(Nothing stopping the OP from grabing a copy rgb.txt from the xorg
code, though...)

>

--
Robert Heller -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments



Paul@Tcl3D

unread,
Mar 18, 2011, 4:06:37 PM3/18/11
to
Hello Matthias,

The Tcl3D source code distribution (www.tcl3d.org) has a file called
tcl3dUtilColors.tcl. This file contains a list of color names with their
corresponding RGB values and some utility functions.

Hope that helps,

Paul

Ian Gay

unread,
Mar 19, 2011, 12:00:28 PM3/19/11
to
There's also a table in the tk source code, in xlib/xcolors.c

Ian

Paul@Tcl3D wrote:

--
*********** To reply by e-mail, make w single in address **************

Matthias Meier

unread,
Mar 21, 2011, 3:45:56 AM3/21/11
to
Thanks,

this will help.

Matthias


Ian Gay schrieb:

0 new messages