GENCOLOR(1)
π¨ gencolor(1) β the BRL-CAD manual page, bestie edition π
okay so this is gencolor, straight out of the BRL-CAD lineup β¨ she's a tiny little byte-printing queen and honestly she ate π
β¨ NAME β¨
gencolor β spits out a repeated pattern of byte values, over and over, like a hype song on loop π
π SYNOPSIS π
gencolor [-p | -b] [-r count] [-s squaresize | -S squaresize] [-w width | -W width] [-n height | -N height] [val1 ... valN] > output_file
π« DESCRIPTION π«
So gencolor writes a repeated pattern of 8-bit byte values out to standard output β that's it, that's the gig π«Ά
Where do the pattern values come from? Each one ranges from 0 to 255, and they're taken from the command-line arguments. If you don't give any arguments, they get read in binary form from standard input instead. And if there's literally nothing β no arguments and no piped input β she just uses a single default value of 0 (that's black, iconically π€).
The assembled pattern can be up to 131072 bytes long, no cap on the drama but there is a cap on the size β¨
By default the pattern repeats forever, like your favorite song on repeat πΈ. The -r option limits the output to a fixed number of pattern repetitions. Alternatively, if you specify an image geometry (-s/-S, -w/-W, -n/-N) or an output format (-p, -b), gencolor emits exactly enough bytes to fill one image of the given dimensions β which is so convenient for generating solid-color pix(5) or bw(5) backgrounds. it's giving "effortless backdrop" π
β οΈ real talk: gencolor refuses to write to a terminal. no screen-spam for you, bestie. redirect its output to a file or pipe it to another command, periodt.
π¦ OPTIONS π¦
-pβ assumepix(5)output (that's3bytes per pixel π). This is the default, and it only affects the byte count that gets computed when an image geometry is requested without-r.-bβ assumebw(5)output (1byte per pixel, minimal queen energy π).-r_count_ β repeat the pattern _count_ times. Default is to repeat forever (unless an image geometry option supplies a count instead, sneaky π₯).-w_width_,-W_width_ β set the image width in pixels. Default is512.-n_height_,-N_height_ β set the image height in pixels. Default is512.-s_squaresize_,-S_squaresize_ β set both the image width and height to _squaresize_ pixels. symmetrical slay π-h,-?β print the usage message and exit. classic.
π EXAMPLES π
π Example 1. Generate a solid green 512x512 pix image
gencolor -p -s 512 0 255 0 > green.pix
The three-byte RGB pattern (0 255 0) gets repeated to fill a 512x512 pix(5) image, yielding 512 * 512 * 3 bytes. The resulting file can be viewed with pix-fb(1) or pixmatte(1). green screen without the drama, we love to see it π
π«οΈ Example 2. Tile a gradient background under a rendering
gencolor -b -w 1024 -n 768 128 > gray.bw
pix-fb scene.pix
The first command produces a 1024x768 single-channel bw(5) image filled with mid-gray (value 128), suitable as a neutral backdrop or matte before compositing a rendered pix(5) image onto the framebuffer. lowkey the most useful thing ever ngl π«Ά
π SEE ALSO π
brlcad(1), pix(5), bw(5), pix-fb(1), pixmatte(1)
πΈ AUTHOR πΈ
BRL-CAD Team β icons, the whole squad π
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. found a bug? don't suffer in silence bestie, tell the devs π
π and that's the whole page! this lil' manual is from the BRL-CAD fam,BRL-CADsource,GENCOLOR(1)β go forth and fill the world with bytes, ily fr fr ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms