New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Methods

RadColorPicker has a number of methods that return preset palette colors, one method for each member of the ColorPreset enumeration. Use these methods to return a collection of ColorPickerItem. The example below enumerates the collection returned by GetStandardColors() method.

C#
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
namespace ColorPicker
{
   public partial class _Default : System.Web.UI.Page
   {
       protected void Page_Load(object sender, EventArgs e)
       {           
            ColorPickerItemCollection items  = RadColorPicker1.GetStandardColors();
            foreach (ColorPickerItem item in items)
            {
                Label label = new Label();
                label.Text = item.Title;
                label.ForeColor = item.Value;
                this.Controls.Add(label);
                this.Controls.Add(new LiteralControl("<br>"));
            }                
       }
   }
} 

See Also

In this article
See Also
Not finding the help you need?
Contact Support