Why WPF Brushes.Green value is #FF008000

Martin Zhang 21 Reputation points

Red is #FFFF0000, no problem. But for Green, it is not #FF0FF000, it is #FF008000, this is very strange. Can some guy give me a explaination?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,686 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,385 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 82,116 Reputation points

    FF00FF00 is Lime color
    See : Colors Class

2 additional answers

Sort by: Most helpful
  1. Peter Fleischer (former MVP) 19,306 Reputation points

    see ARGB32.

    Green is #FF00FF00, not #FF0FF000 !


  2. DaisyTian-1203 11,616 Reputation points

    Green is system-defined color that has the ARGB value of #FF008000, you can see it in Colors.Green Property. You can check it with adding System.Drawing dll to your project and using below code to get the name of it:

     Color color = ColorTranslator.FromHtml("#FF008000");  
     Color color2 = ColorTranslator.FromHtml("#FF00FF00");  
     MessageBox.Show("#FF008000 Color Name is:" + color.Name+ "\n #FF00FF00 Color Name is:" + color2.Name);  

    You can see the result picture:

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.