Ask a Question related to ASP.NET General, Design and Development.
-
Sreejumon[MVP] #1
convert hex to System.Drawing.Color
Hi,
Here is the sample.
int oleColor = 0xFF00;
// Translate oleColor to a GDI+ Color structure.
Color myColor = ColorTranslator.FromOle(oleColor);
regards
Sreejumon[MVP]
DOTNET makes IT happen
class. How do i do>-----Original Message-----
>Hi,
>I have a hex color and I need to convert it to a Color>this? thanks
>-trevor
>
>
>.
>Sreejumon[MVP] Guest
-
system.drawing ASP.NET VB Problem
I'm having probelms trying to write text to an image coming from a database. I started this using the article on this site but the majority of all... -
System.Drawing and GDI+ Question - Please help
I have a winforms control that draws a rectangle for a boarder and positions some graphical elements around the control to create the boarder effect... -
drawing/color palette
Hi Any one who can help me how to use the color or drawing palette on my director educational program,so that the kids can draw or practice on? ... -
Drawing.Color Problem
Greetings, In creating a server control I added a property of type System.Drawing.Color. When the control is rendered, it generates a style... -
Line drawing bleeding color into background
I use Photoshop to create graphics for the library I work in. I used it to make a floorplan of the library--a line drawing of black on a white... -
Ken Cox [Microsoft MVP] #2
Re: convert hex to System.Drawing.Color
Hi Trevor,
You want ColorTranslator
Dim htmlColor As String = "#ff11aa"
Dim myColor As Color = ColorTranslator.FromHtml(htmlColor)
Label1.ForeColor = myColor
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawingColorTranslatorClassFromHtmlTopi c.asp[/url]
Does this help?
Ken
MVP [ASP.NET]
"Trevor Hartman" <synapsee@hotmail.com> wrote in message
news:%23ZAMvpCPDHA.1624@tk2msftngp13.phx.gbl...
Hi,
I have a hex color and I need to convert it to a Color class. How do i do
this? thanks
-trevor
Ken Cox [Microsoft MVP] Guest



Reply With Quote

