Theme + color blend

2 posts, 0 answers
  1. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 10 Jun 2009 Link to this post

    The Telerik Theme class is missing an iterator for the used colors in the theme. With such an iterator it would be much easier to use the color blend feature.

    As an extension i would like to suggest to have a getter/setter for a colorpalette which contains all the used colors of a theme. The advantage of the colorpalette is it could have an iterator for the colors, be loaded/saved to xml and it could be easily used with every theme. When i define a green colorpalette i could use it with the desert theme, the office 2007 blue theme, the aqua theme, ...

    As a further side effect telerik could provide predefined colorpalettes like a silver and a black colorpalette and then we would not need the office2007black and office2007silver theme anymore. We would just change the colorpalette to silver or black. 

    Kind Regards,


  2. Mike
    Mike avatar
    640 posts

    Posted 11 Jun 2009 Link to this post

    Hello Ramius,

    Thank you for the nice suggestion.
    Actually once you call ApplyColorBlend method, you can iterate through the color blends of a theme, using Theme.ThemeProperties dictionary.
    The code may resemble the following:
    Theme theme = ThemeResolutionService.GetTheme(customThemeName); 
    theme.AddColorBlend("prop1", HslColor.FromColor(Color.Red)); 
    theme.AddColorBlend("prop2", HslColor.FromColor(Color.Blue)); 
    theme.ThemeProperties["param1"] = HslColor.FromColor(Color.Yellow); 
    theme.ThemeProperties["param2"] = HslColor.FromColor(Color.Green); 
    foreach(KeyValuePair<stringobject> prop in theme.ThemeProperties) 
        //prop.Key is the color blend name - prop1 or prop2 
        //prop.Value will the new HslColor value 

    It will be great If you have any suggestions how to improve the API to be more convenient. Even though the time frame is getting really short, we still can squeeze in some improvements for Q2.

    Concerning predefined color pallets for Office 2007 Blue/Black/Silver themes the problem is that color blends offer limited flexibility in terms of graphics design and themes would still need some fine -tuning in Visual Style Builder. Nevertheless we will consider your suggestion and discuss possible improvements in this area.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft R3 2016 release webinar banner
Back to Top