Ejemplo n.º 1
0
    protected void color_postback(object sender, Obout.Ajax.UI.ColorPicker.ColorPostBackEventArgs e)
    {
        textbox.Style[HtmlTextWriterStyle.BackgroundColor] = e.Color;

        lblInfo.Text = e.Color.ToString();


        Color c = (Color)System.Drawing.ColorTranslator.FromHtml(e.Color);


        //lblInfo.Text += cc1.ToString() + " " + cc2.ToString() + " " + cc3.ToString() ;

        l1.BackColor = utilCharts.LightenColor(c, .1);
        l2.BackColor = utilCharts.LightenColor(c, .2);
        l3.BackColor = utilCharts.LightenColor(c, .3);
        l4.BackColor = utilCharts.LightenColor(c, .4);
        l5.BackColor = utilCharts.LightenColor(c, .5);
        l6.BackColor = utilCharts.LightenColor(c, .6);
        l7.BackColor = utilCharts.LightenColor(c, .7);
        l8.BackColor = utilCharts.LightenColor(c, .8);
        l9.BackColor = utilCharts.LightenColor(c, .9);

        l1.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .1)).ToString();
        l2.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .2)).ToString();
        l3.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .3)).ToString();
        l4.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .4)).ToString();
        l5.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .5)).ToString();
        l6.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .6)).ToString();
        l7.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .7)).ToString();
        l8.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .8)).ToString();
        l9.Text = ColorTranslator.ToHtml(utilCharts.LightenColor(c, .9)).ToString();
    }
Ejemplo n.º 2
0
 protected void color_postback(object sender, Obout.Ajax.UI.ColorPicker.ColorPostBackEventArgs e)
 {
     textbox.Style[HtmlTextWriterStyle.BackgroundColor] = e.Color;
 }