Community & Support
Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Chart / Setting hexadecimal value for color transparency of RadChart elements

Setting hexadecimal value for color transparency of RadChart elements

Article Info

Rating: 4

Article information

Article relates to

RadChart v2.x

RadTChart for ASP.NET AJAX
(Telerik.Web.UI 2008.1.x)

Created by

Bob, Telerik

Last modified

April 12 2008

Last modified by

Ves, Telerik


HOW-TO

Set hexadecimal value for color transparency of RadChart elements.

SOLUTION
To set a semi-transparent color to a chart element in the chart's XML configuration file, you need to insert the transparency value before the color code.

Example:
Solid white: #FFFFFF (#RRGGBB R - red, G - green, B - blue)
Semi-transparent white: #50FFFFFF(#AARRGGBB A - alpha blending value)


where “50” is the value of the transparency component in the hexadecimal number system. To convert a decimal percentage to a hexadecimal value, you can use the default Windows Calculator.

  1. Make sure you are in Scientific view (see screenshot below).
  2. Select the “Dec” mode and enter a decimal value for the transparency. Values range from 0 to 255, where 0 is fully transparent and 255 is solid color. If you want a 50% transparency, you need to enter 127.
  3. On select of “Hex,” from the radiobutton group, the calculator will display the hexadecimal value. For 50% transparency, or 127, this will be 7F



Note:

If the hexadecimal value is a single digit or letter, enter a zero before it. For example, the hexadecimal value of 10 is “A.” If you want to set 10 for the transparency of the white color, enter “0AFFFFFF.”. Values range from 0 to 255 in decimal.

Comments

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.