Selvam84 Posted June 12, 2009 Report Share Posted June 12, 2009 Hi How can I assign color as <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />RGB value or hexadecimal? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> For example instead of ChrBarChart.Series[0,1].Color = Color.Red; I want to use ChrBarChart.Series[0].Color = RGB values of a color to a hexadecimal string Please help. Thanks Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 12, 2009 Report Share Posted June 12, 2009 Try this: Chart1.Series[0].Color = System.Drawing.ColorTranslator.FromHtml("#508E21"); Quote Link to comment Share on other sites More sharing options...
juanZ Posted June 12, 2009 Report Share Posted June 12, 2009 Hi, You can also define custom RGB color using the FromArgb method of the System.Drawing.Color class. Chart1.Series[0].Color = Color.FromArgb(100, 12, 32, 43); // (Alpha, Red, Green, Blue) each one can be set from 0 to 255. Quote Link to comment Share on other sites More sharing options...
Selvam84 Posted June 13, 2009 Author Report Share Posted June 13, 2009 Thanks alot for your reply, It works Quote Link to comment Share on other sites More sharing options...
Selvam84 Posted June 13, 2009 Author Report Share Posted June 13, 2009 Thanks alot for your reply, It works Quote Link to comment Share on other sites More sharing options...
mohanhegde Posted July 18, 2011 Report Share Posted July 18, 2011 Thanks a lot buddy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.