MH & nmh: Email for Users & Programmers

May, 2006

Color Resources
by Brent Welch

The Tk toolkit allows color to be controlled with X resource database settings. The app-defaults-color file defines a grey family for the Tk widget set that provides a nice background for the color highlights used by exmh. Some colors are named symbolically. For others, hexadecimal numbers specify the red, green, and blue components of the colors, with two hex digits for each component. A family of greys are defined -- ranging from light grey, #efefef, to a 50% grey, #7f7f7f. The basic widget settings are shown below.

The background of a button when the mouse is over it. Default is white.
The foreground of a button when the mouse is over it. Default is black.
The color of the selector in radio and check buttons. Default is black.
The standard background color for widgets. Default is #efefef (a light grey).
The standard foreground color for widgets. Default is black.
Background for selected text. Default is #bfdfff (a light blue).
The foreground for scrollbars. Default is #dfdfdf (grey).
The foreground for scrollbars when the mouse is over them. Default is white.
The foreground for buttons that are disabled. Default is #7f7f7f (50% grey).
The foreground for menu entries that are disabled. Default is #7f7f7f.
The background for text entry widgets used in dialogs. Default is white.
The foreground for text entry widgets. Default is black.
The foreground for text labels. Default is blue.
Hint: If you use a monochrome screen and want reverse video, put the following resource definitions in your ~/.exmh-defaults-mono file:
    *Background: black
    *Foreground: white
    *c_background: black
    *c_foreground: white
The remaining resources are special resources introduced by exmh that define the color highlights. These resources control the appearance of the table of contents and folder label display. The trailing Bg or Fg in some resource names is purely historical accident. Originally you could specify only the foreground (for current and unseen) or the background (for moved and deleted). Now, for the benefit of users with greyscale monitors, you can specify all of them. The fdispColor.tcl and ftocColor.tcl files have good examples of the use of these resources.
The color for the current message and current folder. Default is violet red.
The background color for the current message. Default is white.
The color for unseen messages and folders that contain unseen messages. Default is blue.
The background color for unseen messages. Default is normal background (same as text widget default background).
The background color for messages that are marked for refiling, and the background label color for the target folder for refiling. Default is yellow.
The foreground color for messages that are marked for refiling. The default is normal foreground.
The foreground color for messages marked for deletion. Default is normal foreground.
The foreground color for labels in the folder display. Default is black.
The background color for labels in the folder display. Default is white.
The color for the popups that display nested folders. Default is grey.
The color for normal status messages. Default is blue.
The color for error messages. Default is purple.
The color for warning messages. Default is red.
The color for messages from the background process. Default is medium sea green.