| Presentation styles / Using presentation styles | |
When providing a value for style attributes that define a color, you can specify a generic color name or its RGB value.
This section describes how to specify a value for style attributes defining colors, such as textColor.
{ generic-color | #rrggbb }
In most cases it is not possible to know what a potential end-user might expect regarding the font family. Therefore, your application should avoid the usage of explicit font families and use only the fontWeight/fontStyle/fontSize properties. A specific font family should be used only if the client can't determine a proper default font family for the desired platform.
The language defines a set of generic color names, interpreted by the front end according to the graphical capability of the workstation.
| Generic color name | RGB value (exact color depends on front-end type) | 
|---|---|
white  | 
#FFFFFF  | 
black  | 
#000000  | 
darkGray  | 
#A9A9A9  | 
gray  | 
#808080  | 
lightGray  | 
#D3D3D3  | 
darkBlue  | 
#00008B  | 
blue  | 
#0000FF  | 
lightBlue  | 
#ADD8E6  | 
darkCyan  | 
#008B8B  | 
 cyan  | 
#00FFFF  | 
lightCyan  | 
#E0FFFF  | 
darkMagenta  | 
#8B008B  | 
magenta  | 
#FF00FF  | 
lightMagenta  | 
#FFC0FF  | 
darkOlive  | 
#505000  | 
olive  | 
#808000  | 
lightOlive  | 
#AAAA44  | 
darkGreen  | 
#006400  | 
green  | 
#008000  | 
lightGreen  | 
#90EE90  | 
darkTeal  | 
#005050  | 
teal  | 
#008080  | 
lightTeal  | 
#33CCCC  | 
darkRed  | 
#8B0000  | 
red  | 
#FF0000  | 
lightRed  | 
#FF8080  | 
darkOrange  | 
#FF8C00  | 
orange  | 
#FFA500  | 
lightOrange  | 
#FFCC00  | 
darkYellow  | 
#AAAA00  | 
yellow  | 
#FFFF00  | 
lightYellow  | 
#FFFFE0  | 
System color names can be used to get a color from the current theme of the workstation windowing system:
| System color name | Meaning | 
|---|---|
window  | 
Window background. | 
windowText  | 
Text in windows. | 
buttonFace  | 
Face color for three-dimensional display elements. | 
buttonText  | 
Text on push buttons. | 
highLight  | 
Item(s) selected in a control. | 
highLightText  | 
Text of item(s) selected in a control | 
infoBackground  | 
Background color for tooltip controls. | 
infoText  | 
Text color for tooltip controls. | 
grayText  | 
Grayed (disabled) text. | 
appWorkSpace  | 
Background color of multiple document interface | 
background  | 
Desktop background | 
In some cases, you may also specify a color with the RGB notation, starting with a # hash character.
Each value of the RGB color specification must be provided in hexadecimal, in the range [00-FF].
<StyleAttribute name="textColor" value="blue" /> <StyleAttribute name="textColor" value="#00FF45" />