What are the RGB values of the default accent colors in Windows Phone 7?

后端 未结 3 635
不知归路
不知归路 2021-01-30 06:00

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?

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 06:26

    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

提交回复
热议问题