CNICE(1) cnice-0.6 CNICE(1) 29-Oct-1996 NAME cnice - make cheap colors SYNOPSIS cnice -q [-v] [-ca] [-f free] [-d distance] [colors] cnice [-s] [-a] [-f free] [-d distance] -e command [args] cnice -l [-a] cnice -x [-m] [-a] [-f free] [-d distance] [files] DESCRIPTION cnice is an X application that queries the default colormap of the default screen. It can be used to print out the map or examine the color cells available for free use. cnice can also be used to pre- parse argument of a command for color names and find the color that takes the least resources. cnice is also able to parse X resource files for color names and modify them. Optionally it can add 3d shading color definition to the resource definitions for Motif. OPTIONS -q puts cnice into query mode. In this mode it expects color names. The generated output in verbose mode: tag: input_color -> output_color cellnumber distance for each color. In non-verbose mode it is s/input_color/output_color/g for colors that need to be changed. Possible values for tag are: allocated: color need to be allocated exact: exact color can be shared approximate: approximate color can be shared far: far color can be shared The number of free cells are summerized at the last line in verbose mode. Used tells how many cells are not available for any use because some application allocated the color cell for private use (read-write). Shared tells how many cells can be allocated read-only - sharing colors with other applications. Free tells how many celss are available for private (read-write) or shared (read-only) use. -c is used with - q option. It keeps cnice running continuously. Useful if you want to keep cells allocated. -v turns off verbose mode. - 1 - Formatted: December 26, 2024 CNICE(1) cnice-0.6 CNICE(1) 29-Oct-1996 -f free sets up a threshold for the color allocation logic. If the number of free entries in the colormap are equal to or more than this number far colors get allocated. The default value is 20. -d distance sets up a distance for color chosing logic to determine which colors should be considered far colors. The farest distance is 1000. This is the distance between black and white. The default value is 70. Note that colors do not get allocated even if they are far if there are less than threshold number of free cells available. -e command This option should not be followed by any more options. cnice executes the command by preparsing its command line arguments and if any colors are found modify those to be allocatable/usable. The rebuilt command line is passed to the program. -s is used only with - e option. It makes cnice picky about colors. Normally it accepts color names but with this option it will ignore those that do not start with #. -l lists all color cells and their availibility. The list format is: cellno color free/used/shared -x reads standard input and interpret the lines as Resource Database values. cnice modifies the values that imply color names and write the whole input with the edited values back to standard output. -m is used in conjunction with the - x option. It generates extra output for shading colors for Motif. The extra resource name generated from background are foreground armColor topShadowColor bottomShadowColor ENVIRONMENT DISPLAY FILE /usr/lib/X11/rgb.txt - 2 - Formatted: December 26, 2024 CNICE(1) cnice-0.6 CNICE(1) 29-Oct-1996 EXAMPLES setenv DISPLAY unix:0.0 cnice -e xterm -bg darkgreen -fg peachpuff cnice -x -m /usr/lib/X11/app-defaults/XMcd | xrdb -merge - cnice -l SEE ALSO X(1x), xrdb(1x) AUTHOR This program was written by Gaspar Sinai <gsinai@gol.com>. - 3 - Formatted: December 26, 2024