Get and weight colors from image

Posted on 2007-07-31
Last Modified: 2013-12-17
I don't know the first thing about image processing and working with images in C#, so I'm looking for a solution or someone to point me in the direction of a solution that may solve what we are trying to do.

We want people to be able to upload a base picture and derive the colors from it.  Once the colors are derived, we need them to be weighted, i.e.:
#F3ACD4 makes up 23%
#754A8E makes up 18%
etc. up to 100%

Then based on those percentages, we need to assign those to certain values in a style sheet to compose a color scheme for a web page.

Is this possible?
Question by:Phreak3eb
    LVL 14

    Accepted Solution

    Have a look at this

    Hope it helps.

    Will let you know if I come across anything  on net.
    LVL 96

    Expert Comment

    by:Bob Learned
    You could use a Hashtable (2003) or Dictionary<string, int> (2005) to count the occurrences of the color.   C# has the ability to quickly get information about an image that VB.NET doesn't have.


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now