Click here to Skip to main content
13,195,163 members (68,990 online)
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 30 Jan 2013

System Color Viewer

, 30 Jan 2013
Rate this:
Please Sign up or sign in to vote.
View each color in System.Drawing.Color


When I make GDI+ projects, I need color information, and I used the 'DevColor' extension before, it is a very good one but it doesn't work on my machine now (VS2012). So today, I created this viewer for a simple way to access color information in the System.Drawing.Color class.

Using the Code

Here is the code:

private void updateView()

    object obj= Color.AliceBlue ;

    PropertyInfo[] ps = typeof(Color).GetProperties();

    for (int i = 0; i < ps.Length; i++)
        if (ps[i].DeclaringType == typeof(Color)) 
            obj = ps[i].GetValue(new Color(), null);
            if (obj is Color)
                listView1.Items.Add(new ListViewItem(new string[] { 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer CONSPEC CONTROLS
China China
Happy to meet you!

You may also be interested in...


Comments and Discussions

QuestionAn extended version of your "System Color Viewer" … Pin
Martin08154-Feb-13 1:33
memberMartin08154-Feb-13 1:33 
AnswerRe: An extended version of your "System Color Viewer" … Pin
Chen.shaohua9-Feb-13 20:05
memberChen.shaohua9-Feb-13 20:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171019.1 | Last Updated 30 Jan 2013
Article Copyright 2013 by Chen.shaohua
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid