Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Surface Colors and Palettes



Microsoft Surface administrators control the default color scheme of the Surface system. This global color scheme determines the default colors of Surface controls that are rendered in all applications. Application developers can use those same colors to style additional elements in their applications. Alternatively, application developers can override the Surface colors to affect any element in an application that uses those colors.

Surface Palettes

Surface comes with the following four pre-defined color palettes. These palettes are defined in the classes of the Microsoft.Surface.Presentation.Palettes namespace. The color palettes and the Surface controls were designed to enable you to create a sophisticated, unembellished layout that emphasizes content. The colors in each palette complement each other stylistically, and the controls use a clean and simple design that encourages users to interact directly with content.

 

Light palette

This is the default color scheme. This color scheme makes applications more visible in physical environments that are brightly lit.

Surface Light color scheme

Dark palette

This color scheme makes applications more visible in physical environments that are dimly lit.

Surface Dark color scheme

LightHighContrast palette

This color scheme provides maximum visibility for users with low vision, in a brightly-lit environment.

Surface Light High Contrast color scheme

DarkHighContrast palette

This color scheme provides maximum visibility for users with low vision, in a dimly-lit environment.

Surface Dark High Contrast color scheme
noteNote
Windows Presentation Foundation (WPF) controls that are not Surface controls might not use the Surface color scheme.

Color Hierarchy

Administrators specify the default color scheme in the registry. (For more information, see the "Administrator Options" section that follows.)

When your application starts, the default color scheme determines the initial values of the color properties in the SurfaceColors run-time object by setting them to the values in the corresponding palette.

The color properties of the SurfaceColors run-time object determine the values of color resources that are available to all Surface applications.

The color resources are used in the default templates of Surface controls. Thus, the default color scheme determines the default colors of Surface controls in all applications.

Accessibility Overrides

If the Accessibility options of the operating system are set to a High Contrast theme, all Surface applications will use the "DarkHighContrast" color scheme.

To respect Accessibility standards, the "DarkHighContrast" color scheme is locked and cannot be overridden by the registry or by the application developer. Only if a desktop theme other than High Contrast is chosen will the Surface color scheme unlock, restoring the colors in your application.

A High Contrast theme is set in the Personalization section of Control Panel, or when the High Contrast shortcut (Alt+Left Shift+Print Screen) is pressed.

Administrator Options

Administrators can specify the Surface color scheme by creating the following registry value:

 

Registry key String value name Possible values

HKEY_LOCAL_MACHINE\SOFTWARE\[Wow6432Node\]Microsoft\Surface\v2.0\Global\UI

DefaultPalette

"Light"

"Dark"

"LightHighContrast"

"DarkHighContrast"

noteNote
Setting this registry value will affect only devices made for Surface or Windows 7 computers that have the Surface SDK installed.

Developer Options

Surface application developers have the following options when it comes to using or modifying colors in their applications:

  • Use the default color scheme to style Surface controls.

    To use the Surface color scheme to style Surface controls in your application, you don't have to do anything. The controls in your application are automatically skinned using the Surface colors.

  • Consume Surface colors.

    If you want to use Surface colors to style other elements in your application, you can set the colors and brushes in your application to the values of the SurfaceColors properties or to their corresponding resources.

    For more information, see Styling Elements in your Application by using Surface Colors.

  • Overwrite Surface Colors.

    To overwrite the Surface colors applied to Surface controls and other elements in your application, you can overwrite the color resources in XAML in the scope of an object, a page, or the application.

    For more information, see Overwrite SurfaceColor Resources.

  • Change the Default Palette.

    If you decide that your application looks best using a specific color scheme, you can set the default palette for your application to one of the four Surface palettes. This change will not affect other Surface applications.

    For more information, see Setting the Default Palette.

Testing Your Colors

Test your application in all color schemes to make sure that no portion of your user interface (UI) disappears. For example, if you set the background color of your root layout panel to a dark brush while in the "Dark" theme, the text of an ungrouped SurfaceRadioButton will disappear if the theme changes to "Light" because the text in the SurfaceRadioButton automatically changes to a dark color.

See Also

Did you find this information useful? Please send us your suggestions and comments.

© Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.