{
    "mode": "man",
    "parameter": "ppmrainbow",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ppmrainbow/1/json",
    "generated": "2026-06-10T11:01:53Z",
    "synopsis": "ppmrainbow [-width=number] [-height=number]\n[-tmpdir=directory] [-verbose] color ...\nAll  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐\nstead of one to designate an option.  You may use either white space or equals signs  between\nan option name and its value.",
    "sections": {
        "NAME": {
            "content": "ppmrainbow - Generate a rainbow\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ppmrainbow [-width=number] [-height=number]\n[-tmpdir=directory] [-verbose] color ...\n\n\nAll  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐\nstead of one to designate an option.  You may use either white space or equals signs  between\nan option name and its value.\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ppmrainbow generates a PPM image that fades from one color to another to another from left to\nright, like a rainbow.  The colors are those you specify on the command line, in that  order.\nThe first color is added again on the right end of the image.\n\nIf you want a vertical or other non-horizontal rainbow, run the output through pnmrotate.\n\nOne  use  for such a rainbow is to compose it with another image under an alpha mask in order\nto add a rainbow area to another image.  In fact, you can make rainbow-colored text by  using\npbmtext, pnmcomp, and ppmrainbow.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-width",
                    "content": "The width in pixels of the output image.\n\nDefault is 600.\n"
                },
                {
                    "name": "-height",
                    "content": "The height in pixels of the output image.\n\nDefault is 8.\n"
                },
                {
                    "name": "-tmpdir",
                    "content": "The directory specification of the directory ppmrainbow is to use for temporary files.\n\nDefault is the value of the TMPDIR environment variable, or /tmp if TMPDIR is not set.\n"
                },
                {
                    "name": "-verbose",
                    "content": "Print  the  \"commands\"  (invocations of other Netpbm programs) that ppmrainbow uses to\ncreate the image.\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "ppmmake(1), pnmcomp(1), pbmtext(1), ppmfade(1), ppm(5).\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Arjen Bax wrote ppmrainbow in June 2001 and contributed it to the Netpbm package.  Bryan Hen‐\nderson wrote this man page in July 2001.\n\n\n\n\n\n1 July 2001                               ppmrainbow(1)",
            "subsections": []
        }
    },
    "summary": "ppmrainbow - Generate a rainbow",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "The width in pixels of the output image. Default is 600."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "The height in pixels of the output image. Default is 8."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "The directory specification of the directory ppmrainbow is to use for temporary files. Default is the value of the TMPDIR environment variable, or /tmp if TMPDIR is not set."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print the \"commands\" (invocations of other Netpbm programs) that ppmrainbow uses to create the image."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ppmmake",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmmake/1/json"
        },
        {
            "name": "pnmcomp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmcomp/1/json"
        },
        {
            "name": "pbmtext",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbmtext/1/json"
        },
        {
            "name": "ppmfade",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmfade/1/json"
        },
        {
            "name": "ppm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Generate a rainbow.",
        "examples": [
            {
                "description": "Generate a rainbow consisting of the specified colors",
                "command": "ppmrainbow {{color1 color2 ...}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "Specify the size of the output in pixels",
                "command": "ppmrainbow {{-w|-width}} {{width}} {{-h|-height}} {{height}} {{color1 color2 ...}} > {{path/to/output_file.ppm}}"
            },
            {
                "description": "End the rainbow with the last color specified, do not repeat the first color",
                "command": "ppmrainbow {{-n|-norepeat}} {{color1 color2 ...}} > {{path/to/output_file.ppm}}"
            }
        ]
    }
}