Fred's ImageMagick Scripts

 Creates either a linear or radial gradient image with two or more stops to specify colors and locations along the gradient direction.

EXAMPLES

 Example 1 - Grayscale Linear Gradient Arguments: (defaults) or -w 256 -h 256 -s "white black" or -w 256 -h 256 -s "white 0 black 100" or -w 256 -h 256 -s "white black" -t linear -d 180 or -w 256 -h 256 -s "white black" -t linear -d to-bottom or -w 256 -h 256 -s "black white" -t linear -d to-top or -w 256 -h 256 -s "black white" -t linear -d 0 Arguments: -w 256 -h 256 -s "black white" or -w 256 -h 256 -s "black 0 white 100" or -w 256 -h 256 -s "black white" -t linear -d 180 or -w 256 -h 256 -s "black white" -t linear -d to-bottom or -w 256 -h 256 -s "white black" -t linear -d to-top or -w 256 -h 256 -s "white black" -t linear -d 0

 Example 2 - Two-Tone Linear Gradient Arguments: -w 256 -h 256 -s "red blue" Arguments: -w 256 -h 256 -s "red none"

 Example 3 - Multiple Stops Linear Gradient - Variation In Rotation Angle Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d XX where XX is 30 degree increments from 0 to 330 combined as an animation

 Example 3 - Multiple Stops Linear Gradient - To Sides Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-top Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-right Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-bottom Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-left

 Example 4 - Multiple Stops Linear Gradient - To Corners Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-topright Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-bottomright Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-bottomleft Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t linear -d to-topleft

 Example 4 - Multiple Stops Circular Gradient Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d closest-side Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d furthest-side Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d closest-corner or since centered -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d furthest-corner Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d closest-side -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d furthest-side -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d closest-corner -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t circle -d furthest-corner -c "100,100"

 Example 4 - Multiple Stops Elliptical Gradient Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d closest-side or since centered -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d furthest-side Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d closest-corner or since centered -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d furthest-corner Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d closest-side -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d furthest-side -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d closest-corner -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -d furthest-corner -c "100,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -c "100,100" -r "50,100" Arguments: -w 400 -h 200 -s "red yellow 20 cyan 50 magenta 70 blue" -t ellipse -c "100,100" -r "100,50"

 What the script does is as follows: creates an appropriate size and oriented linear or radial grayscale gradient creates a 1D image of appended gradient sections according to the color stop pairs applies the 1D colored gradient to the 2D grayscale gradient using -clut