bggen is a program that generates a rectangular 24-bit image, with
a smooth vertical gradient between the listed colors. (If you only specify one
color, the image will be a single solid color.)
The top of the image will be in color (r1,g1,b1), and the
bottom of the image will be in color (rn,gn,bn). Intermediate positions
in the image are interpolated between these colors. If you specify
more than 2 colors, the
gradient passes through all the specified colors, in the order specified.
The -d option lets you specify what display to connect to. bggen
only connects to the display to find out the size of the screen (and hence,
the default size for the generated image).
The -g option lets you control the size of the image, as a standard
X geometry specification. (ie, something like "512x348")
The -G option lets you control the tile size, as a standard
X geometry specification. (ie, something like "32x32")
Normally, (if you dont give a -G option), the gradient fills the entire
image. If you specify a -G option, the gradient will fill a portion of the
image, and that portion will be center-tiled to fill the rest of the image.
The -r option lets you rotate the gradient counter-clockwise by the
specified number of degrees.
The -a option lets you force bggen to generate an image in PPM Ascii
format, rather than in PPM raw format.
The -w and -h options also let you set the size of the image.
They are provided only for backward compatibility.
The -b option specifies the number of significant bits in the (output)
color specifications. It must range between 1 and 8, inclusive. Use
values less than 8 (the default) to limit color use by increasing the color
granularity. Since XV can do this sort of thing better, this is of dubious
A <color-spec> can be three integers separated by spaces, forming an R,G,B
triple ("0 255 0"). The values should be between 0 and 255.
A <color-spec> can also be a standard X color specification by name ("green")
or value ("#00ff00"). This is decidedly easier, and the three integer
method remains mainly for backward compatibility. One note: the # character
is treated specially by many shells, and should probably be protected by
putting a #146; character in front of it, or wrapping the entire value with
a pair of single-quotes.
bggen doesnt actually affect your background directly. bggen
merely generates a PPM (Portable Pixmap Format) datafile and dumps it
to stdout. Its up to some other program (such as XV) to read this file
and display it.
To use bggen, you should pipe its output into an XV command, such as:
"xv -root -quit -"