xmodcmap(1) — USER COMMANDS
NAME
xmodcmap - an X colormap editor
SYNOPSIS
xmodcmap [options]
DESCRIPTION
The xmodcmap program is an X11 client that provides a user with the capability to modify a color map and install it as the current display color map. It also can save the color map in a file, and read in a previously saved color map. xmodcmap is usually used to help users pick colors they want to use in their X resource database.
OPTIONS
All of the standard X Toolkit command-line options are accepted by xmodcmap along with the additional options listed below and in the RESOURCES section. All xmodcmap resources can be set as command-line options also. See the RESOURCES section for detailed descriptions of the following options. All of the options may be abbreviated to a unique spelling.
-bcbg color
sets the background color of the button cursor
-bcfg color
sets the foreground color of the button cursor
-bcu cursor
sets the shape of the cursor when in a button
-cb dimension
indicates, in pixels, the border width around the color squares in the color map palette
-cbd color
sets the border color for the color squares in the color map palette
-cbg color
sets the background color of the cursor in the main window
-cfg color
sets the foreground color of the cursor in the main window
-ch dimension
indicates, in pixels, the height of the color squares in the color map palette
-cu cursor
sets the shape of the cursor when in the main window
-cw dimension
indicates, in pixels, the width of the color squares in the color map palette
-data file
provides the name of a colormap data file to read
-easy makes it easy to install and uninstall the xmodcmap color map by causing the color map to be installed/uninstalled when the user clicks any mouse button anywhere in the xmodcmap main window that is not in some other button or slider
-help prints a help message describing the xmodcmap options
-hex prints the color values in hex
-hl dimension
indicates, in pixels, the size of the extra border for an active color square in the color map palette
-kb dimension
indicates, in pixels, the size of the border around the slide knob
-kbd color
sets the border color for all slide knobs
-kbg color
sets the background color for all slide knobs
-kbm file
sets the bitmap for all slide knobs
-kfg color
sets the foreground color for all slide knobs
-kh dimension
indicates, in pixels, the heights of each of the slide knobs
-kw dimension
indicates, in pixels, the widths of each of the slide knobs
-lb dimension
indicates, in pixels, the size of the border of the labels
-lbd color
sets the border color for all labels
-lbg color
sets the background color for all labels
-lfg color
sets the foreground color for all labels
-nopal indicates that colors are to be put in the main window instead of a separate palette window
-sb dimension
indicates, in pixels, the size of the border around the sliders
-sbd color
sets the border color for all sliders
-sbg color
sets the background color for all sliders
-scbg color
sets the background color of the slider cursor
-scfg color
sets the foreground color of the slider cursor
-scu cursor
sets the shape of the cursor when in a slider
-sfg color
sets the foreground color for all sliders
-sh dimension
indicates, in pixels, the height of the sliders
-sw dimension
indicates, in pixels, the width of the sliders
WINDOW LAYOUT
The xmodcmap main window has three functional regions: a button bar at the top, in the middle an area displaying either the current active color cell or (with the
-nopal option) an area displaying all colors in the colormap, and on the bottom an area containing three sliders which are used to modify the currently active color cell.
Button Bar
The button bar has buttons that control the display of separate color map and input/output windows, as well as buttons to control the installation/de-installation of the xmodcmap color map. The buttons available on the button bar include: Quit, Reset, Undo, Palette/NoPalet (if -nopal is not specified), Global, I/O, and Install/UnInstall. In the middle of the button bar is a label indicating the color map index number for the currently active color cell.
Color Map Cell Area
Without the -nopal option, the color of the color map cell area is the color of the currently selected color cell. If the -nopal option is supplied, then the color map cell area displays all of the color cells in the display color map. In this case one can select a color cell by clicking any mouse button on the cell. The border of the currently selected color cell is highlighted to indicate that it has been selected.
Slider Area
This region consists of three sliders for controlling the color of the currently selected color cell: one slider for red, one for green, and one for blue. The numeric value corresponding to each slider position is displayed below each slider.
BUTTON BAR BUTTONS
All xmodcmap functions are invoked by using the buttons in the button bar. The button bar contains the following buttons: Quit, Reset, Undo, Palette/NoPalet (if -nopal is not specified), Global, I/O, and Install/UnInstall.
Quit
Exits xmodcmap. Note that if the xmodcmap color map has been installed (either by the window manager or by the Install button in the button bar) then the color map is automatically uninstalled when xmodcmap exits.
Reset
Resets all colors in the color map to the values they had when xmodcmap was first invoked.
Undo
Undoes the last modification made to the value of the currently selected color cell.
Palette/NoPalet
Displays or hides the separate color map palette window. If the -nopal option is specified, this button does not exist. In that case one selects color cells by clicking on the appropriate color box in the color map cell area just below the button bar.
Global
Indicates that any changes made to the sliders affect all cells in the color map. If this button is pressed, then the label in the center of the button bar changes to ALL COLORS to indicate that all colors are selected.
I/O
Displays the separate file I/O window.
Install/UnInstall
Installs or uninstalls the xmodcmap color map. Note that the installation of the color map is also under the control of the window manager (if one is running). So the xmodcmap color map may be installed by the window manager without the user having to push the Install button in the button bar.
WIDGET TREE
The xmodcmap widget hierarchy to use for specifying resources is shown below. Each widget’s class name is listed first and is separated by a dash from its instance name.
XModcmap - xmodcmap
Composite - Main
Simple - ColorBar [ if -nopal is not specified ]
Simple - ColorCell [ if -nopal is specified ]
[ With -nopal, the above is duplicated for each color
cell ]
Command - Install
Label - ColorLabel
Label - RGBLabel
Label - RGBLabel
Label - RGBLabel
Scbar - RGBSlide
Scbar - RGBSlide
Scbar - RGBSlide
Command - Quit
Command - Undo
Command - Reset
Command - Palette [ if -nopal is not specified ]
Command - Global
Command - I/O
TransientShell - FileIO
Dialog - Filename
Label - label
Text - value
Command - Read
Command - Write
Command - Cancel
TransientShell - ColorMenu [ if -nopal is not
specified ]
Simple - ColorCells [ if -nopal is not specified ]
RESOURCES
Class names follow resource instance names and are shown in parentheses:
buttonCursor (Cursor)
sets the shape of the cursor when in a button
buttonCursorBackground (Background)
sets the background color of the button cursor
buttonCursorForeground (Foreground)
sets the foreground color of the button cursor
colorBorderColor (BorderColor)
sets the border color for the color squares in the color map palette
colorBorderWidth (BorderWidth)
indicates, in pixels, the border width around the color squares in the color map palette
colorHeight (ColorHeight)
indicates, in pixels, the height of the color squares in the color map palette
colorWidth (ColorWidth)
indicates, in pixels, the width of the color squares in the color map palette
colormapData (Data)
provides the name of a colormap data file to read
cursor (Cursor)
sets the shape of the cursor when in the main window
cursorBackground (Background)
sets the background color of the cursor in the main window
cursorForeground (Foreground)
sets the foreground color of the cursor in the main window
easy (Easy)
makes it easy to install and uninstall the xmodcmap color map by causing the color map to be installed/uninstalled when the user clicks any mouse button anywhere in the xmodcmap main window that is not in some other button or slider
help (Help)
prints a help message describing the xmodcmap options
hex (Hex)
prints the color values in hex
highlight (Highlight)
indicates, in pixels, the size of the extra border for an active color square in the color map palette
knobBackground (Background)
sets the background color for all slide knobs
knobBitmap (Pixmap)
sets the bitmap for all slide knobs
knobBorderColor (BorderColor)
sets the border color for all slide knobs
knobBorderWidth (BorderWidth)
indicates, in pixels, the size of the border around the slide knob
knobForeground (Foreground)
sets the foreground color for all slide knobs
knobHeight (KnobHeight)
indicates, in pixels, the height of each of the slide knobs
knobWidth (KnobWidth)
indicates, in pixels, the width of each of the slide knobs
labelBackground (Background)
sets the background color for all labels
labelBorderColor (BorderColor)
sets the border color for all labels
labelBorderWidth (BorderWidth)
indicates, in pixels, the size of the border of the labels
labelForeground (Foreground)
sets the foreground color for all labels
noPalette (NoPalette)
indicates that colors are to be put in the main window instead of a separate palette window
slideBackground (Background)
sets the background color for all sliders
slideBorderColor (BorderColor)
sets the border color for all sliders
slideBorderWidth (BorderWidth)
indicates, in pixels, the size of the border around the sliders
slideCursor (Cursor)
sets the shape of the cursor when in a slider
slideCursorBackground (Background)
sets the background color of the slider cursor
slideCursorForeground (Foreground)
sets the foreground color of the slider cursor
slideForeground (Foreground)
sets the foreground color for all sliders
slideHeight (SlideHeight)
indicates, in pixels, the height of the sliders
slideWidth (SlideWidth)
indicates, in pixels, the width of the sliders
SEE ALSO
BUGS
Attempting to use xmodcmap on a black and white display will fail if the display does not allow writable color maps.