Post

Windows Phone 7 Theme Colors

The Windows Phone 7 has two different background color modes; dark or light. In addition, there are ten accent colors to choose from.

image

image

There’s currently no simple way of detecting which theme and accent color that the user has selected his or her device. However, since the colors of the current theme is injected into to applications resources, one can at least read out the various colors from there.

The background color can be determined using this piece of code:

1
Color backgroundColor = (Color)Application.Current.Resources["PhoneBackgroundColor"];

And in a similar fashion the foreground and accent colors can be determined like this:

1
2
Color foregroundColor = (Color)Application.Current.Resources["PhoneForegroundColor"];
Color accentColor = (Color)Application.Current.Resources["PhoneAccentColor"];

All the various resource names are described here; Theme Resources for Windows Phone.

ThemeBackground Color ValueForeground Color Value
Dark#FF000000#FFFFFFFF
Light#FFFFFFFF#DE000000
Accent colorValue
01-WP7-magenta-accent#FFFF0097
02-WP7-purple-accent#FFA200FF
03-WP7-teal-accent#FF00ABA9
04-WP7-lime-accent#FF8CBF26
05-WP7-brown-accent#FFA05000
06-WP7-pink-accent#FFE671B8
07-WP7-orange-accent#FFF09609
08-WP7-blue-accent#FF1BA1E2
09-WP7-red-accent#FFE51400
10-WP7-green-accent#FF339933
This post is licensed under CC BY 4.0 by the author.