Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 ASP.NET Color convert , +
Actually i'm using color extender to pick the color in asp.net...but while i'm picking the color it generate the hex decimal values....but i need only rgb values...Pls any one guide me....
Posted 7-Dec-12 0:11am
Deenuji3.8K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try this I hope It will help you
 
How to convert Hexadecimal Color to RGB color (24 Bit)[^].
 
keep smiling Smile | :) Smile | :) Smile | :) haapy codingSmile | :)
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Have a look at this link:
 
http://snipplr.com/view/13358/[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Why have you posted this question when you have already been given the answer in the C# forum? Please post in one place only, and do not spam the forums.
  Permalink  
Comments
Deenuji vellore at 7-Dec-12 7:07am
   
k sir....hereafter i won't do like this...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Solution:
 
Write this coding in button or whatever...
 
System.Drawing.Color MyColor = System.Drawing.Color.FromArgb(val);
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

string hex = "0x333366";
int r = Convert.ToInt32(hex.Substring(2,2),16);
int g = Convert.ToInt32(hex.Substring(4,2),16);
int p = Convert.ToInt32(hex.Substring(6,2),16);
 
--SJ
  Permalink  
Comments
Deenuji vellore at 7-Dec-12 5:51am
   
Error:A field initializer cannot reference the non-static field, method, or property 'aj._Default.hex'
CodeNinja-C# at 7-Dec-12 6:10am
   
Sorry, I don't get you
Deenuji vellore at 7-Dec-12 7:10am
   
if i using ur code means i got above error...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 575
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,476
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,917


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100