Sujet : Re: Named colours in Tk
De : nospam.nurdglaw (at) *nospam* gmail.com (Alan Grunwald)
Groupes : comp.lang.tclDate : 20. May 2025, 12:55:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100hqmf$27fvo$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 20/05/2025 09:32, Harald Oehlmann wrote:
Am 19.05.2025 um 16:05 schrieb Alan Grunwald:
Tk recognises a lot of colour names, as documented at, say, https:// www.tcl-lang.org/man/tcl9.0/TkCmd/colors.html Is it possible to get a list of them?
>
I guess I could hack it out of one of the source files, but I'd hope to be able to get it in a cleaner fashion.
Alan,
this is a long awaited low hanging fruit in Tk.
An "tkinfo colornames" should be implemented.
I would love to use it in colour chooser dropdown boxes etc.
Thanks,
Harald
Thanks Harald,
That indeed is what I hope to use it for. I'm going to parse rgb.txt as recommended elsewhere. At times like this, I wish I understood the Tcl/Tk internals better; I might have a go at implimenting [tkinfo colournames] myself - I'm a Brit, I look forward to the colournames/colornames argument :-)