bgcolor

Defines the background color of a page or an item.

Syntax

   <bgcolor>color</bgcolor>
Table 1. bgcolor parameters
Parameter Type Description
color special The color may 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

Available in

box, button, check, checkgroup, combobox, field, form global, label, list, page global, pane, popup, radio, radiogroup, richtext, slider, table, toolbar

Examples

These samples all set the background color to forest green.

   <bgcolor>forest green</bgcolor>
   <bgcolor>34,139,34</bgcolor>
   <bgcolor>#228B22</bgcolor>

Usage details

  1. Default: varies depending on the object
    • Form: white
    • Page: The bgcolor of the form
    • Item (depends on the item type):
      • button items: gray (or grey)
      • check, combobox, field, list, popup, radio, and slider items: white
      • checkgroup, label, pane, radiogroup, richtext, and table items: transparent
      • box items: transparent with a gray outline
      • toolbar: the bgcolor of the page.
  2. The transparent color has no RGB equivalent.
    • If button items are set to transparent it will disables press-in/pop-out animations, does not change background color when inactive and does not change the default border value to off.
  3. The following form items do not support transparent bgcolor: combobox, field, form global, list, page global, popup, slider, and toolbar.
    Note: Check and radio items support transparent bgcolor when they are rendered in the Viewer, but not when they are rendered in Webform Server.