Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Color to Hex String
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00997937
Message ID:
00998042
Vues:
31
Bill,
You are welcome.

Einar
>Hi Einar,
>
>Ok, thanks. I'll give that a try.
>
>>Bill,
>>A little bit of typing will get you the result you want:
>>
>>System.Drawing.Color myColor = System.Drawing.Color.Blue;
>>System.String sColor = myColor.R.ToString("X2") + myColor.G.ToString("X2") + myColor.B.ToString("X2");
>>MessageBox.Show(sColor);
>>
>>
>>Hope this helps.
>>
>>Einar
>>
>>>This should be a no-brainer and I'm sure I can figure it out (eventually :-) ), but in the interest of expediency, what is the .NET syntax to convert a Color object color value to a hex string?
>>>
>>>E.g. Color.Blue would be "0000FF"
>>>
>>>Thanks,
>>>Bill
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform