Sponsored By
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Article
Forum
Blog
Quiz
Beginner
Careers
Contact
Login
Email Id
Password
Remember Me
Forgot Password?
Sign Up
Home
|
Product
|
Services
|
About Us
|
Interview
|
DeveloperSection
|
Submit an Article
|
Submit Blog
Report Abuse Form
Reason:
Home
>>
.Net
>>
C#
>>
how to convert html color to rgb in c#?
Author
Post
Pravesh Singh
Total Post:
46
Member Since:
12/12/2011
Points:
238
how to convert html color to rgb in c#?
Posted On:
7/16/2012 4:32:14 AM
Report Abuse
Hi,
Can anyone tell me how to convert html color to rgb in c#. Please give the code if possible.
Reply
Author
Post
Arun Singh
Total Post:
49
Member Since:
7/1/2011
Points:
338
Re: how to convert html color to rgb in c#?
Posted On:
7/21/2012 1:28:23 AM
Report Abuse
Hi Pravesh Singh,
You can use this code to resolve your problem....
using System.Drawing;
using System;
//convert to the HTML color value of a known System.Drawing.Color
string htmlNamedColorValue = ColorTranslator.ToHtml(Color.Crimson);
//convert to System.Drawing.Color from HTML hex color value
Color colorValueFrmHex = ColorTranslator.FromHtml("#FFFF33");
//convert to System.Drawing.Color from HTML known color
Color colorValue = ColorTranslator.FromHtml("DarkRed");
Reply
Report Abuse Form
Reason:
Total Online Users:
7212
Advertisement
Advertise with Us
Copyright ©
2013
MindStick. All Rights Reserved.
Home
|
Contact Us
|
Services
|
Feedback
|
Advertisement
|
Privacy Policy
|
Term & Conditions
|
About Us