1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "../docbook-xml/docbookx.dtd"
5 <!ENTITY % myents SYSTEM "../fvwm.ent" >
9 <!-- $Id: colorGradients.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
11 <section id='color_gradients'>
12 <title>Color Gradients</title>
14 <para>A color gradient is a background that changes its color gradually
15 from one hue to a different one. Color gradients can be used by
16 various commands and modules of fvwm. There are eight types of
18 <emphasis remap='B'>HGradient</emphasis>
19 is a horizontal gradient,
20 <emphasis remap='B'>VGradient</emphasis>
22 <emphasis remap='B'>DGradient</emphasis>
23 is diagonal from top left to bottom right,
24 <emphasis remap='B'>BGradient</emphasis>
25 is backwards diagonal from bottom left to top right,
26 <emphasis remap='B'>SGradient</emphasis>
27 is concentric squares,
28 <emphasis remap='B'>CGradient</emphasis>
29 is concentric circles,
30 <emphasis remap='B'>RGradient</emphasis>
31 is a radar like pattern and
32 <emphasis remap='B'>YGradient</emphasis>
33 is a Yin Yang style (but without the dots).</para>
35 <para>The color gradient syntax has two forms:</para>
38 <option>?Gradient</option
40 ><replaceable>colors</replaceable
43 ><replaceable>start-color</replaceable
46 ><replaceable>end-color</replaceable
50 <para>This form specifies a linear gradient. The arguments denote the
51 total number of <replaceable>colors</replaceable>
52 to allocate (between 2 and 1000), the initial color and the final
58 <fvwmref cmd="TitleStyle"/> VGradient 20 rgb:b8/ce/bc rgb:5b/85/d0
63 <option>?Gradient</option
65 ><replaceable>colors</replaceable
68 ><replaceable>segments</replaceable
71 ><replaceable>color</replaceable
74 ><replaceable>length</replaceable
77 ><replaceable>color</replaceable
79 ><arg choice='plain' rep='repeat'
82 ><replaceable>length</replaceable
85 ><replaceable>color</replaceable
91 <para>The second form specifies a nonlinear gradient. The arguments are:
92 the total number of <replaceable>colors</replaceable>
93 to allocate (between 2 and 1000), then the number of
94 <replaceable>segments</replaceable>.
95 For each segment, specify the starting <replaceable>color</replaceable>,
96 a relative <replaceable>length</replaceable>,
97 then the ending color. Each subsequent segment begins with the
98 second color of the last segment. The lengths may be any
99 non-negative integers. The length of one segment divided by the
100 sum of all segments lengths is the fraction of the colors that
101 are used for the segment.</para>
103 <para>Examples:</para>
106 <fvwmref cmd="MenuStyle"/> * <literal output='man'>\
107 </literal>MenuFace DGradient 128 2 lightgrey 50 blue 50 white
109 # 20% gradient from red to blue,
110 # 30% from blue to black,
111 # 50% from black to grey
112 <fvwmref cmd="MenuStyle"/> * <literal output='man'>\
113 </literal>MenuFace DGradient 100 3 Red 20 Blue 30 Black 50 Grey
115 # 50% from blue to green, then
116 # 50% from yellow to red
117 <fvwmref cmd="Colorset"/> 0 HGradient 128 3 Blue 1000 Green 1 Yellow 1000 Red