473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Get color name from ARGB

I have a color that was derived from

Color color = new Color();
color = Color.FromArgb(alpha, red, green, blue);

and I want to get the name of the color if it is known. I tried
'color.IsNamedColor' but based on MSDN, IsNamedColor will return false if
'FromArgb' was used even if the ARGB value matches the ARGB value of a
predefined color. Does anybody know of a way to get the name of a color if
it was defined using Color.FromArgb?

Thanks

Dan
Sep 20 '07 #1
1 13188
I figured it out from the below link.

http://www.thescripts.com/forum/thread365789.html

Dan

"Dan Reber" <dr****@nospam.comwrote in message
news:%2*****************@TK2MSFTNGP06.phx.gbl...
>I have a color that was derived from

Color color = new Color();
color = Color.FromArgb(alpha, red, green, blue);

and I want to get the name of the color if it is known. I tried
'color.IsNamedColor' but based on MSDN, IsNamedColor will return false if
'FromArgb' was used even if the ARGB value matches the ARGB value of a
predefined color. Does anybody know of a way to get the name of a color
if it was defined using Color.FromArgb?

Thanks

Dan

Sep 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Krishan | last post by:
hi, maybe i've been looking at this for too long, but i think i found a strange thing in the JDK. take the color class and use the method getRGB() on a color, you get an integer with the color...
9
by: Morten Wennevik | last post by:
Saving a color object to registry will set it's value to something like "Color ", or "Color ", but how do I get this back into a Color object??? Casting it to Color only causes an exception. ...
4
by: PJ6 | last post by:
I can't find any built-in way to do this. I'm assigning an HTML cell a bgcolor and want to do it from a real color FromArgb... how do I get the # string to assign it to the HTML cell? Or do I have...
5
by: Samuel L Matzen | last post by:
Hi NG, I have an Argb color stored in a database as a 32 bit integer. If this color is a KnownColor, is there any way I can get the known color name so I can display the known color name on...
2
by: sympatico | last post by:
im trying to read an image(*.bmp) from file and then color the black pixels in it to the color i want using argb. Below is the code of what im trying to do but this gives me an error "setPixel is...
5
by: MikeY | last post by:
Hi Everyone, Is there a way (syntax) for converting/casting color so I can find the System.Byte of my chosen color with in my button? I have buttons colored ie "Color.Olive" and up to now I...
5
by: Bob Homes | last post by:
In VB6, foreground and background colors of controls had to be assigned a single number. If you knew the RGB values for the color, you still had to convert them into the single number accepatable...
11
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
2
by: Zytan | last post by:
I wanted to do something simple like checking my own Color variable against Color.Black, and == returned false, even though their RGB values were all 0! Of course, there's the A (alpha) value, but...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.