Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:34:31+00:00 2026-05-25T09:34:31+00:00

For a WP7 App I want to use an additional color to contrast whatever

  • 0

For a WP7 App I want to use an additional color to contrast whatever the the current theme color is.

I decided to make the contrast color ‘Red’ unless the theme color was already ‘Red’ in which case I would male the contract Color ‘ Blue’

But the following code does not work as it does not detect the theme color as ‘Red’ even though it has been set that way and is certainly showing that way in the app.

private void AssessContrastColor()
    {

        System.Diagnostics.Debug.WriteLine("In assess color");

        SolidColorBrush themeBrush = App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush;
        Color themeColor = themeBrush.Color;

        SolidColorBrush contrastBrush = new SolidColorBrush();

      //  contrastBrush.Color = ControlPaint.Light(themeColor); 



        if (themeColor == Colors.Red)
        {
          contrastBrush.Color = Colors.Blue;
        }


         else  contrastBrush.Color = Colors.Red;

        _ContrastThemeBrush = contrastBrush;


    }

The code seems pretty straightforward, but, when looking at this through debugger, the Phone accent color when I get it (when its Red) is not #FFFF0000 but something a little different.

Just as an aside to this, was looking to create the contrast color as one that was a bit lighter than the theme color, looked around and it seemed like it could be quote a bit of code, but then stumbled across the ‘ControlPaint.Light call’ which seemed ideal, but doesnt seem to be an option uder WP7? Hence commented out above.

Any advice appreciated. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:34:32+00:00Added an answer on May 25, 2026 at 9:34 am

    This would be because the Accent colour isn’t Red, but something close to it, to be precise #E51400

    You can find a list of all the colours and how to use them here. And for future proofing the answer, a list of all the colours:

    Blue     #1BA1E2
    Brown    #A05000
    Green    #339933
    Lime     #8CBF26
    Magenta  #FF0097
    Orange   #F09609
    Pink     #E671B8
    Purple   #A200FF
    Red      #E51400
    Viridian #00ABA9
    

    But I would strongly recommend against changing the contrast colours. You’re likely to make content less readable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use a WrapPanel in my WP7 app, so I used the
I want to submit update for wp7 app. My current version is 1.0. I
I am working on a wp7 app and I want to make an https
I want to implement tomb-stoning in my WP7 app and this app is not
I want to create a simple login functionality in WP7 app using remote MySQL
i'm studying wp7 app changing app on https://github.com/slodge/face . I want to change this
I want to develop an app for WP7 using C# where a user taps
Is it possible to make a normal WP7 app as a game (simple flashcards)
i have a problem with a WP7 app. I want that a user can
I'm working on a WP7 mango App that makes use of Linq2SQL for data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.