GENCOLOR(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

🎨 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 β€” assume pix(5) output (that's 3 bytes 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 β€” assume bw(5) output (1 byte 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 is 512.
  • -n _height_, -N _height_ β€” set the image height in pixels. Default is 512.
  • -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 πŸ‘‘


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-CAD source, GENCOLOR(1) β€” go forth and fill the world with bytes, ily fr fr πŸ’œπŸ¦‹βœ¨
πŸ“¦ where this page comes from