← 返回命令列表

Linux command

ppmrainbow 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Generate rainbow gradient

ppmrainbow -width [100] -height [50] [color1] [color2] > [output.ppm]

Create red to blue gradient

ppmrainbow -width 200 -height 100 red blue > [gradient.ppm]

Multiple color gradient

ppmrainbow -width 300 -height 50 red yellow green blue > [rainbow.ppm]

说明

ppmrainbow creates a horizontal color gradient image that smoothly transitions through the specified color stops. Any number of named colors can be provided, and the tool interpolates between them evenly across the image width. This is useful for creating gradient backgrounds, color bars for testing, or decorative elements. The -norepeat option prevents the gradient from wrapping back to the first color. Part of the Netpbm toolkit.

参数

-width _N_
Output width.
-height _N_
Output height.
-norepeat
Don't repeat spectrum.

FAQ

What is the ppmrainbow command used for?

ppmrainbow creates a horizontal color gradient image that smoothly transitions through the specified color stops. Any number of named colors can be provided, and the tool interpolates between them evenly across the image width. This is useful for creating gradient backgrounds, color bars for testing, or decorative elements. The -norepeat option prevents the gradient from wrapping back to the first color. Part of the Netpbm toolkit.

How do I run a basic ppmrainbow example?

Run `ppmrainbow -width [100] -height [50] [color1] [color2] > [output.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -width _N_ do in ppmrainbow?

Output width.