System Color Sample

This sample demonstrates how system colors can be assigned instead of fixed colors.

As of Internet Explorer 4, system colors may be specified in Web pages in addition to the named colors. Unlike the other named colors however, user-defined system colors have no numeric RGB equivalent because the exact color is not known until the Web page is viewed on the user's system. Users can choose their own system color scheme from the Windows Control Panel.

  Note The system color names have been deprecated in the CSS3 recommendation.

Try changing your system colors in the Control Panel and notice the effect this has on the following table.

ColorName
activeborder ActiveBorder
activecaption ActiveCaption
appworkspace AppWorkspace
background Background
buttonface ButtonFace
buttonhighlight ButtonHighlight
buttonshadow ButtonShadow
buttontext ButtonText
captiontext CaptionText
graytext GrayText
highlight Highlight
highlighttext HighlightText
inactiveborder InactiveBorder
inactivecaption InactiveCaption
inactivecaptiontext InactiveCaptionText
infobackground InfoBackground
infotext InfoText
menu Menu
menutext MenuText
scrollbar Scrollbar
threeddarkshadow ThreeDDarkShadow
threedface ThreeDFace
threedhighlight ThreeDHighlight
threedlightshadow ThreeDLightShadow
threedshadow ThreeDShadow
window Window
windowframe WindowFrame
windowtext WindowText

Not all of the system colors are appropriate for a background or text color; however, some of them are intended to be used in combination. The following table demonstrates appropriate text and background colors:

CaptionText on ActiveCaption
InactiveCaptionText on InactiveCaption
ButtonText on ButtonFace
WindowText on Window
HighLightText on HighLight
MenuText on Menu
InfoText on InfoBackground

If any of the text in the above table is difficult to read, try changing the specific system color in the Control Panel.




[Right-click, and choose View Source from the shortcut menu.]

© Microsoft Corporation. All rights reserved. Terms of use.