[Tk] Get hexa code color from name

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


In a widget Tk, How can I can hexa code color from a color name ?

For example: which method can give the hexa code of  red name
print $widget->METHOD('red'); #  #FF0000

Best Regards,


Re: Get hexa code color from name

Quoted text here. Click to load it

The answer is to use rgb widget method and use sprintf.

Site Timeline