Color Allocation and tk colormodel

In Tk 3.6 color allocations could fail if the colormap was full. In this case Tk would revert its colormodel to monochrome and only use black and white. The tk colormodel command was used to query or set the colormodel. In Tk 4.0 color allocations do not fail. Instead, the closest possible color is allocated. Because of this, the tk colormodel operation is no longer supported. Use the winfo visual command which is described on page 540, to find out the characteristics of your display,

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.