|
-
July 30th, 2009, 07:08 AM
#1
Get Color name from ARGB for customized color
Hi,
how can we get Color name when ARGB value is given for a customized color.I tried in many ways.Able to get the when it is a known color or named color.
My project needs to capture the image from webcam and from the image i need to get the color from the specified pixel and should confirm that expected image came.
when it is named color..it is very simple.
Code :
string Name = "Give here Hex value of the required color";
ColorConverter cc = new ColorConverter();
Color c = (Color)cc.ConvertFromString(Name);
if (c.IsNamedColor)
Name = c.Name;
Help is required in the case of custom color.
Thanks
vinni
-
July 30th, 2009, 12:25 PM
#2
Re: Get Color name from ARGB for customized color
There are 16,777,216 possible combinations of RGB. .NET cannot possibly have a name for every one of them.
-
July 30th, 2009, 12:43 PM
#3
Re: Get Color name from ARGB for customized color
You are assuming that every possible color has been given a name, but that is not the case. There are so many shades between what we call named colors that it would be silly to do so (and probably very difficult to think up new names for each one )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|