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.
Use generic color names, to keep your style definitions portable accros several front-end types.
Generic color name | Visual result (1) | RGB value |
---|---|---|
black |
|
#000000 |
blue |
|
#0000FF |
cyan |
|
#00FFFF |
darkBlue |
|
#00008B |
darkCyan |
|
#008B8B |
darkGray |
|
#A9A9A9 |
darkGreen |
|
#006400 |
darkMagenta |
|
#8B008B |
darkOlive |
|
#505000 |
darkOrange |
|
#FF8C00 |
darkRed |
|
#8B0000 |
darkTeal |
|
#005050 |
darkYellow |
|
#AAAA00 |
gray |
|
#808080 |
green |
|
#008000 |
lightBlue |
|
#ADD8E6 |
lightCyan |
|
#E0FFFF |
lightGray |
|
#D3D3D3 |
lightGreen |
|
#90EE90 |
lightMagenta |
|
#FFC0FF |
lightOlive |
|
#AAAA44 |
lightOrange |
|
#FFCC00 |
lightRed |
|
#FF8080 |
lightTeal |
|
#33CCCC |
lightYellow |
|
#FFFFE0 |
magenta |
|
#FF00FF |
olive |
|
#808000 |
orange |
|
#FFA500 |
red |
|
#FF0000 |
teal |
|
#008080 |
white |
|
#FFFFFF |
yellow |
|
#FFFF00 |
System color names can be used to get a color from the current theme of the workstation windowing system:
System color name | Meaning |
---|---|
appWorkSpace |
Background color of multiple document interface |
background |
Desktop background |
buttonFace |
Face color for three-dimensional display elements. |
buttonText |
Text on push buttons. |
grayText |
Grayed (disabled) text. |
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. |
systemAlternateBackground |
Background color of the alternate row in listviews |
window |
Window background. |
windowText |
Text in windows. |
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" />