What are the RGB values of the default accent colo

2020-05-13 15:56发布

问题:

I am making icons for some Win Phone 7 apps and want to use some solid colors the way all the other apps do.

Where can I find a reference for these colors?

回答1:

Magenta - #FF0097 | 255,0,151
Purple - #A200FF | 162,0,255
Teal - #00ABA9 | 0,171,169
Lime - #8CBF26 | 140,191,38
Brown - #A05000 | 160,80,0
Pink - #E671B8 | 230,113,184
Orange - #F09609 | 240,150,9
Blue - #1BA1E2 | 27,161,226
Red - #E51400 | 229,20,0
Green - #339933 | 51,153,51

Not sure if there's an official reference for these colors, but this article certainly suffices now...



回答2:

The official colors were not available at the time of the OP's question and accepted answer; here's the updated and official Theme Overview for Windows Phone:

Accent Color     RGB          Hex
---------------------------------------
blue             27,161,226   #FF1BA1E2
brown            160,80,0     #FFA05000
green            51,153,51    #FF339933
lime             162,193,57   #FFA2C139
magenta          216,0,115    #FFD80073
mango (orange)   240,150,9    #FFF09609
pink             230,113,184  #FFE671B8
purple           162,0,255    #FFA200FF
red              229,20,0     #FFE51400
teal (viridian)  0,171,169    #FF00ABA9


And a sample image for good measure (taken from the theme overview on MSDN):



回答3:

For the general case,

SolidColorBrush b = (SolidColorBrush)Application.Current.Resources["PhoneAccentBrush"];
System.Diagnostics.Debug.WriteLine( "R: " + b.Color.R + 
                                   " G: " + b.Color.G + 
                                   " B: " + b.Color.B );

Noting that OEMs/Carriers (and devs up for a bit of hacking) are free to add custom colours.

With output as follows for the default Blue.

R: 27 G: 161 B: 226