473,385 Members | 2,069 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.

How to convert colors to HTML

How does one convert "LightGray" (ie.) to an HTML color?

Thanks

Nov 21 '05 #1
7 1607
Use the ColorConverter class.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Tom wilson" <ye*******@nospam.com> wrote in message
news:69********************************@4ax.com...
How does one convert "LightGray" (ie.) to an HTML color?

Thanks

Nov 21 '05 #2
"Tom wilson" <ye*******@nospam.com> schrieb:
How does one convert "LightGray" (ie.) to an HTML color?


\\\
MsgBox(ColorTranslator.ToHtml(Color.FromArgb(100, 200, 10)))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Nuts, that's the one I meant. Sorry.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uH**************@TK2MSFTNGP11.phx.gbl...
"Tom wilson" <ye*******@nospam.com> schrieb:
How does one convert "LightGray" (ie.) to an HTML color?


\\\
MsgBox(ColorTranslator.ToHtml(Color.FromArgb(100, 200, 10)))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
"Tom wilson" <ye*******@nospam.com> schrieb:
How does one convert "LightGray" (ie.) to an HTML color?


\\\
MsgBox(ColorTranslator.ToHtml(Color.FromArgb(100, 200, 10)))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5
Nuts, that's the one I meant. Sorry.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uH**************@TK2MSFTNGP11.phx.gbl...
"Tom wilson" <ye*******@nospam.com> schrieb:
How does one convert "LightGray" (ie.) to an HTML color?


\\\
MsgBox(ColorTranslator.ToHtml(Color.FromArgb(100, 200, 10)))
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
Tom,

See this thread
http://groups-beta.google.com/group/...5905ce8783be12

I hope this helps

Cor
Nov 21 '05 #7
Tom,

See this thread
http://groups-beta.google.com/group/...5905ce8783be12

I hope this helps

Cor
Nov 21 '05 #8

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

Similar topics

5
by: Dan Jacobson | last post by:
What's Nielsen talking about in http://www.useit.com/alertbox/20040503.html http://www.useit.com/alertbox/20040510.html Can't a good browser keep track of visited vs. unvisited link colors? Is my...
3
by: Tom wilson | last post by:
How do I convert "LightGray" to an HTML color? I have a color picker that returns the name of the color and I need it's HTML equivilent (like #050505) Thanks!
2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
2
by: James dean | last post by:
Do i have to create an index pallette. How do i do that?. Or, Can i not just make an ordinary 8pp pixel format without this indexed problem...... *** Sent via Developersdex...
11
by: Paul Smith | last post by:
I have a button on my web page the backcolor of which I want to change: btnSample.backcolor = ???????? I want the color to be Gainsboro However I enter Gainsboro or color.Gainsboro I have...
1
by: Filippo Bettinaglio | last post by:
Using C# 2005 How can I load a 24bit colors .BMP image and convert it in a 8bit colors BMP, and save the new one on disk? Many Thanks, Filippo
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...
3
by: rishabhshrivastava | last post by:
Hello All, How can I convert a value to Double in JavaScript??? In vbscript i believe its done as cDbl(Value) I tried lots of way but getting a value of "NaN". Any suggestions/ideas will...
0
Akatz712
by: Akatz712 | last post by:
The following function converts a decimal number representing a color stored in the way that Microsoft windows stores colors (low byte is red), and converts it to a hex string which is needed for web...
5
by: JJ | last post by:
I have a function that returns an int that represents an rgb colour code (e.g. '5731173'). How can I convert this to a hex value of the form #D2D2D2 so that I can use it to color an object? ...
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...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.