# Color Gradients

A color gradient is a background that changes its color gradually from one hue to a different one. Color gradients can be used by various commands and modules of fvwm. There are eight types of gradients: HGradient is a horizontal gradient, VGradient is vertical, DGradient is diagonal from top left to bottom right, BGradient is backwards diagonal from bottom left to top right, SGradient is concentric squares, CGradient is concentric circles, RGradient is a radar like pattern and YGradient is a Yin Yang style (but without the dots).

The color gradient syntax has two forms:

`?Gradient` colors start-color end-color

This form specifies a linear gradient. The arguments denote the total number of colors to allocate (between 2 and 1000), the initial color and the final color.

Example:

     VGradient 20 rgb:b8/ce/bc rgb:5b/85/d0

`?Gradient` colors segments color length color length color

The second form specifies a nonlinear gradient. The arguments are: the total number of colors to allocate (between 2 and 1000), then the number of segments. For each segment, specify the starting color, a relative length, then the ending color. Each subsequent segment begins with the second color of the last segment. The lengths may be any non-negative integers. The length of one segment divided by the sum of all segments lengths is the fraction of the colors that are used for the segment.

Examples:

     * \
    	MenuFace DGradient 128 2 lightgrey 50 blue 50 white

    # 20% gradient from red to blue,
    # 30% from blue to black,
    # 50% from black to grey
     * \
    	MenuFace DGradient 100 3 Red 20 Blue 30 Black 50 Grey

    # 50% from blue to green, then
    # 50% from yellow to red
     0 HGradient 128 3 Blue 1000 Green 1 Yellow 1000 Red