Standard Colors

Uniface supports standard color definitions including system colors as defined by the operating system, Web colors defined by the W3C, and RGB (red-green-blue) colors expressed in hex or decimal numbers. Any of these color definitions can be used when defining the value of foreground and background colors of components, widgets, panels, and toolbars.

System Colors

System colors are platform-specific and can be changed by the end user using operating system settings. The names are fixed on every system and cannot be changed, but the names can be mapped to user-defined colors.

System color names have the form COLOR_Object. For example, COLOR_BTNFACE describes the color of a button in Microsoft Windows.

Web Colors

Web colors are colors defined by the W3C consortium. They form part of the current Web standards, including HTML, XHMTL, and SVG. Web color keywords and their respective values are predefined and cannot be changed by the user. For a list of the color keywords and their numeric and hexadecimal values, refer to Color Names Supported on All Browsers.

RGB Colors

RGB colors are combinations of three values representing the colors red, green, and blue. They can be expressed as decimal values or hexadecimal values. For example:

Color

Decimal RGB Value

Hexadecimal RGB Value

Black

0,0,0

#000000

White

255,255,255

#FFFFFF

Red

255,0,0

#FF0000

Green

0,255,0

#008000

Blue

0,0,255

#0000FF

RGB color values are also commonly used in HTML and are returned by operating systems. For example, when you select a color using the Microsoft Windows color selection dialog box, the value returned is an RGB value. Because RGB colors are expressed as numeric values, they can be easily manipulated using calculations, making it possible to implement graduated color effects.