Index Color

Code that identifies a Uniface index color, which represents a combination of background and foreground colors. Applicable only to Form components. Deprecated.

Note:  The Color property is useful for compatibility with older Uniface applications but is not recommended for new applications. Use the Foreground Color and Background Color properties instead. Depending on the object, other color properties are also available. For more information, see Background Color (BackColor) , Foreground Color (ForeColor) and Gradient Fill Style (BackColorFill).

Value Description
0 Current Microsoft system colors (Windows only)
1 through 63 Number representing an index color combination
No Do not use index colors.


If no Color is selected (Color=No), the object inherits colors from its parent. If none of its parent objects have a color defined, it is assigned to colors determined by the operating system. See Color=No.

When a Color is selected for an object, that color identified by the index number is applied. However, this is subject to a number of restrictions:

  • Uniface provides a default set of color definitions. However, these definitions may be changed in the runtime environment, so it is possible that the actual color displayed may not be the color combination selected in the Uniface IDE. For more information, see Uniface Index Colors .
  • Uniface follows Windows behavior in applying colors. Depending on the Windows version and the object, the color may not always be applied.
  • For entity and area frames, setting Color overrides all properties that may be set in for the object in the initialization file, including BorderType and colors.
  • For entities and fields, Color can be overridden by setting the Foreground Color and Background Color properties in the properties dialog, or in Proc.

    Caution: Avoid combining Uniface index colors with the Foreground and Background properties. For example, if you have set the Foreground and Background colors, you should not use curoccvideo or fieldvideo because these statements set an index color. When the item loses focus, the color is restored to the default index color, not to the Foreground and Background colors.

  • The initialization settings SystemColors and ColorZero also influence the color handling of objects. For more information, see SystemColors and ColorZero.
  • The initialization setting ColorNo causes labels and widgets for which Color is No to be printed with a transparent background. For more information, see ColorNo.


When Color is set to No, the object does not use Uniface index colors, but inherits colors from its parent. If none of its parent objects have a color defined (by the Color, or Background Color and Foreground Color properties), it is assigned to colors determined by the operating system.

A label that has Color set to No uses the background color of its parent entity or form. This color is used even if the underlying form has a bitmap. To have the image visible under the label, you must also set the Transparency property to true, either for the specific label, or in the usys.ini for all labels. For more information, see Transparency.

Setting Color to No, can also affect how labels and widgets are printed.

  • Labels inherit the index color of the parent entity or form. If the parent entity or form (or both) also have the Color property set to No, the label is printed on a white, non-transparent background.
  • Widgets have the Color property set to No, use the Background Color. If this is not defined, the widget is printed on a white or grey non-transparent background. The color depends on the widget and whether the printing is in black and white or color.

To ensure that the background of these objects is transparent, set the ColorNo initialization setting to Transparent. For more information, see ColorNo.

Related Topics