gradient

Specifies the type and color of background gradients.

Syntax

<gradient>
  <type>Type</type>
  <color>Color</color>
  <rate>Rate</rate>
 </gradient>
Table 1. gradient parameters
Parameter Type Description
Type String The type of gradient. Must be one of:
  • none: Use the normal background color with no gradient.
  • linear: A vertical gradient that starts at the top with the gradient color and ends with the background color.
  • split: A combination of two vertical linear gradients. The top half starts with the gradient color and the bottom half starts with the background color.
  • center: A combination of two vertical linear gradients. The top starts with the background color and progresses downward to end with the gradient color in the middle. The bottom starts with the background color and progresses upward to end with the gradient color in the middle.

For label items, the default is none. For button items, the default is center.

Color Special The color can be expressed in any of the following formats:
  • Comma-separated RGB values. For example: 192,192,192
  • Hexadecimal-based RGB values. For example: #336699
  • Color name. For example: blue
Rate Integer A number from 1 to 9 that determines the rate of progression from the gradient color to the background color. A low number indicates a slow progression from one color to the other. A high number indicates a fast progression.

The default rate is 5.

Available in

button, label

Example

This example specifies a vertical linear gradient that starts with the color grey and ends with the color blue. Because the rate is 2, the button appears mostly blue.

<button sid=“B1”>
   <bgcolor>blue</bgcolor>
   <gradient>
      <type>linear</type>
      <color>grey</color>
      <rate>2</rate>
   </gradient>
   <fontcolor>red</fontcolor>
   ...
</button>

Usage details

  1. If the background color of the item is transparent then the gradient is not applied. In this case, the entire item is transparent.
  2. If the color is not present or is not valid then the gradient color is derived by generating a lighter version of the background color.
  3. For printing, if the printbgcolor resolves to a different value than bgcolor then the gradient color is derived by generating a lighter version of the printbgcolor.