<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Using Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Using Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes</link><pubDate>Mon, 08 Jul 2019 20:12:26 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Current Revision posted to Developer Training by Ben Tiedt on 07/08/2019 20:12:26&lt;br /&gt;
&lt;p&gt;Theme palettes allow themes to expose sets of configuration options to theme managers to make groups of configuration easier. The theme, widgets, and other scripted customizations can expose options to select a palette from the current theme and retrieve specific values from the theme-defined palette values.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="When_Would_I_Use_Palettes" name="When_Would_I_Use_Palettes"&gt;&lt;/a&gt;When Would I Use Palettes?&lt;/h2&gt;
&lt;p&gt;Palettes are useful to theme developers to allow controlled sets of key/value options to be selected by theme managers as a consolidated option with a unique preview instead of exposing lower-level options that could be overwhelming or abused.&lt;/p&gt;
&lt;p&gt;For example, the site theme defines palettes that can be used for banner styling. These are all predefined by the theme and represent multiple key/value pairs (some stylistic, some functional) that are consolidated behind simpler selectable named options. The theme can add and remove palettes to meet the branding needs of the community (&amp;quot;we only support these colors&amp;quot;, &amp;quot;all banners should look the same&amp;quot;, etc can be implemented by adding/removing banner palettes in theme studio). When a group manager edits the group theme, the group banner widget exposes a palette selection from the list made available by the site theme. The group manager can select the palette and all of the configuration options associated to that selection can be read by the group banner widget to implement the style and behavior of the selection. If customizations are later made to the group banner widget and additional options are exposed, they can later be added to the palette definitions without requiring the group manager to reconfigure the group banner.&lt;/p&gt;
&lt;h2&gt;&lt;a id="XML_Palette_Definition" name="XML_Palette_Definition"&gt;&lt;/a&gt;XML Palette Definition&lt;/h2&gt;
&lt;p&gt;[[Themes]] can define palettes to be consumed by [[Scripting|scripted customizations]] using the palette XML format:&lt;/p&gt;
&lt;pre&gt;[&lt;br /&gt;&amp;lt;paletteType&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;lt;value /&amp;gt;]*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;]*&lt;br /&gt;&amp;lt;/paletteType&amp;gt;&lt;br /&gt;]*&lt;/pre&gt;
&lt;p&gt;One or more palette types can contain one or more palettes each. Each palette can then contain one or more values, of any type.&lt;/p&gt;
&lt;p&gt;Palette values can be retrieved within widgets and the theme using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;widget extension and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/p&gt;
&lt;p&gt;The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_paletteType_gt" name="lt_paletteType_gt"&gt;&lt;/a&gt;&amp;lt;paletteType /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;paletteType id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; &amp;gt;...&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette type.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the name of the palette type&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_palette_gt" name="lt_palette_gt"&gt;&lt;/a&gt;&amp;lt;palette /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;palette id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; [cssClass=""] [previewCss=""] [default=""] &amp;gt;...&amp;lt;/palette&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of selectable palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;&lt;code&gt;themepalette&lt;/code&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the display name for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;cssClass&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional CSS class applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;previewCss&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional inline styling applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;default&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a boolean (&lt;span class="code"&gt;true&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;false&lt;/span&gt;) identifying whether this palette should be the default selection within a palette type when no other palette has been selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_value_gt" name="lt_value_gt"&gt;&lt;/a&gt;&amp;lt;value /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;pre class="code"&gt;&amp;lt;value id=&amp;quot;&amp;quot; dataType=&amp;quot;&amp;quot; &amp;gt;value&amp;lt;/value&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a value within a palette.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for this value. This is the identifier used when retrieving selected palette values via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;extension methods within widgets and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;dataType&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the data type of this value. Possible data types are:
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Int&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is an integer value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;String&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is as a string value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Color&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS color value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Unit&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Double&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a double-precision floating point value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;value&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Exposing_Palette_Selections" name="Exposing_Palette_Selections"&gt;&lt;/a&gt;Exposing Palette Selections&lt;/h2&gt;
&lt;p&gt;Palette selection from a known palette type are usually exposed via [[Supporting Configuration|configuration]] properties in themes and widgets using the [[api-documentation:themepalette Property Template|themepalette property template]]:&lt;/p&gt;
&lt;pre class="MethodOverload"&gt;&amp;lt;property id=&amp;quot;propertyId&amp;quot; labelResourceName=&amp;quot;nameResource&amp;quot; descriptionResourceName=&amp;quot;descriptionResource&amp;quot; dataType=&amp;quot;String&amp;quot; template=&amp;quot;themepalette&amp;quot; paletteTypeId=&amp;quot;paletteTypeId&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The paletteTypeId attribute would be set to the name of the palette type identified by the current contextual theme (or one of its ancestors). This will render the list of palette options and allow for the selection of one of the defined palettes:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x0/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1561135494125v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The value stored will be the palette&amp;#39;s identifier.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Using_Palette_Selections" name="Using_Palette_Selections"&gt;&lt;/a&gt;Using Palette Selections&lt;/h2&gt;
&lt;div class="documentation-member"&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;p&gt;Palettes can be used by&lt;span&gt;&amp;nbsp;[[Scripting|&lt;/span&gt;scripted customizations]]&lt;span&gt;&amp;nbsp;&lt;/span&gt;in server-executed code or LESS files to make use of the configuration values associated to a palette selection using the palette APIs:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In LESS,
&lt;ul&gt;
&lt;li&gt;[[api-documentation:-evo-themepalette-color LESS Function|-evo-themepalette-color]]&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-double LESS Function|&lt;/span&gt;-evo-themepalette-double]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-int LESS Function|&lt;/span&gt;-evo-themepalette-int]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-string LESS Function|&lt;/span&gt;-evo-themepalette-string]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-unit LESS Function|&lt;/span&gt;-evo-themepalette-unit]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-color LESS Function|&lt;/span&gt;-evo-widgetpalette-color]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-double LESS Function|&lt;/span&gt;-evo-widgetpalette-double]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-int LESS Function|&lt;/span&gt;-evo-widgetpalette-int]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-string LESS Function|&lt;/span&gt;-evo-widgetpalette-string]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-unit LESS Function|&lt;/span&gt;-evo-widgetpalette-unit]]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Velocity and Server-side Javascript,
&lt;ul&gt;
&lt;li&gt;[[api-documentation:core_v2_theme Script API|core_v2_theme.GetPaletteColorValue]]&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteDoubleValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteIntValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteStringValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteUnitValue]]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See&lt;span&gt;&amp;nbsp;&lt;/span&gt;the inline API documentation in Theme Studio, Widget Studio, or Automation Studio for more details.&lt;/p&gt;
&lt;p&gt;When working with values on the server, note the data representation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Palette value data type&lt;/th&gt;
&lt;th&gt;Server data type (.Net)&lt;/th&gt;
&lt;th&gt;Client data type (Javascript)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Int&lt;/th&gt;
&lt;td&gt;Int32&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Color&lt;/td&gt;
&lt;td&gt;String representation of the color: #RRGGBB, #RRGGBBAA, rgb(1-255, 1-255, 1-255), rgba(1-255, 1-255, 1-255, 0-1), hsl(1-255, %, %), hsla(1-255, %, %, 0-1), or a named HTML color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Unit&lt;/td&gt;
&lt;td&gt;String representation of a CSS unit, a px, pt, pc, in, mm, cm, %, em, ex, ch, rem, v2, or vh value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Double&lt;/th&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h2&gt;
&lt;p&gt;The Social site theme defines a palette type named &amp;quot;siteBanner&amp;quot; to define sets of styling and behavior options for site banners using the palette XML format in [[Working with Theme Studio|Theme Studio]]:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;paletteType id=&amp;quot;siteBanner&amp;quot; name=&amp;quot;${resource:palette_type_site}&amp;quot;&amp;gt;
	&amp;lt;palette id=&amp;quot;light&amp;quot; name=&amp;quot;${resource:palette_light}&amp;quot; previewCss=&amp;quot;background-color:#FAFAFA; color:#263238; padding:15px; font-weight:600;&amp;quot;&amp;gt;
		&amp;lt;value id=&amp;quot;background-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#FAFAFA&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;foreground-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#263238&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;search-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#FFFFFF&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;active-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#263238&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;border-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#CFD8DC&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;include-border&amp;quot; dataType=&amp;quot;Int&amp;quot;&amp;gt;1&amp;lt;/value&amp;gt;
	&amp;lt;/palette&amp;gt;
	&amp;lt;palette id=&amp;quot;dark&amp;quot; name=&amp;quot;${resource:palette_dark}&amp;quot; previewCss=&amp;quot;background-color:#263238; color:#90A4AE; padding:15px; font-weight:600;&amp;quot; default=&amp;quot;true&amp;quot;&amp;gt;
		&amp;lt;value id=&amp;quot;background-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#263238&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;foreground-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#90A4AE&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;search-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#3b4d56&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;active-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#ffffff&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;border-color&amp;quot; dataType=&amp;quot;Color&amp;quot;&amp;gt;#CFD8DC&amp;lt;/value&amp;gt;
		&amp;lt;value id=&amp;quot;include-border&amp;quot; dataType=&amp;quot;Int&amp;quot;&amp;gt;0&amp;lt;/value&amp;gt;
	&amp;lt;/palette&amp;gt;
&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Within [[Working with Widget Studio|Widget Studio]], a widget could then be created to&amp;nbsp;allow the selection of a palette from this type&amp;nbsp;by defining [[Using Dynamic Configuration|dynamic configuration]]:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;propertyGroup id=&amp;quot;options&amp;quot; labelText=&amp;quot;Options&amp;quot;&amp;gt;
    &amp;lt;property id=&amp;quot;palette&amp;quot; labelText=&amp;quot;Palette&amp;quot; dataType=&amp;quot;string&amp;quot; template=&amp;quot;themepalette&amp;quot; paletteTypeId=&amp;quot;siteBanner&amp;quot; /&amp;gt;
&amp;lt;/propertyGroup&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The widget could consume the configured value in a custom [[Using LESS|LESS]] file to set the foreground and background colors of the widget:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="less"&gt;.content-fragment.palette-example {
    background-color: -evo-widgetpalette-color(&amp;#39;siteBanner&amp;#39;, &amp;#39;palette&amp;#39;, &amp;#39;background-color&amp;#39;);
    color: -evo-widgetpalette-color(&amp;#39;siteBanner&amp;#39;, &amp;#39;palette&amp;#39;, &amp;#39;foreground-color&amp;#39;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Within [[Using Velocity|Velocity]] script&amp;nbsp;in the widget, palette values can also be referenced as well. For example, the &amp;quot;include-border&amp;quot; palette value is rendered:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="velocity"&gt;#set($includeBorder = $core_v2_theme.GetPaletteIntValue(&amp;#39;siteBanner&amp;#39;, $core_v2_widget.GetStringValue(&amp;#39;palette&amp;#39;, &amp;#39;&amp;#39;), &amp;#39;include-border&amp;#39;, 0, 10))
Include Border:  #if ($includeBorder &amp;gt; 0) Yes #else No #end&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This widget would then be rendered as:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " border="0" src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1562616429686v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;using the default palette selection of &amp;quot;dark.&amp;quot; The default palette selection can then be set in the theme or Theme Options (&lt;strong&gt;Manage &amp;gt; Manage Site Theme &amp;gt; Theme Options&lt;/strong&gt;) or the palette can be selected for this widget only via the widget&amp;#39;s configuration:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/640x0/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1562616598637v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;You can download the full Palette Example widget here:&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-12-83/PaletteExample_2D00_Widget.xml"&gt;PaletteExample-Widget.xml&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Using Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes/revision/5</link><pubDate>Mon, 08 Jul 2019 19:56:57 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Revision 5 posted to Developer Training by Ben Tiedt on 07/08/2019 19:56:57&lt;br /&gt;
&lt;p&gt;Theme palettes allow themes to expose sets of configuration options to theme managers to make groups of configuration easier. The theme, widgets, and other scripted customizations can expose options to select a palette from the current theme and retrieve specific values from the theme-defined palette values.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="When_Would_I_Use_Palettes" name="When_Would_I_Use_Palettes"&gt;&lt;/a&gt;When Would I Use Palettes?&lt;/h2&gt;
&lt;p&gt;Palettes are useful to theme developers to allow controlled sets of key/value options to be selected by theme managers as a consolidated option with a unique preview instead of exposing lower-level options that could be overwhelming or abused.&lt;/p&gt;
&lt;p&gt;For example, the site theme defines palettes that can be used for banner styling. These are all predefined by the theme and represent multiple key/value pairs (some stylistic, some functional) that are consolidated behind simpler selectable named options. The theme can add and remove palettes to meet the branding needs of the community (&amp;quot;we only support these colors&amp;quot;, &amp;quot;all banners should look the same&amp;quot;, etc can be implemented by adding/removing banner palettes in theme studio). When a group manager edits the group theme, the group banner widget exposes a palette selection from the list made available by the site theme. The group manager can select the palette and all of the configuration options associated to that selection can be read by the group banner widget to implement the style and behavior of the selection. If customizations are later made to the group banner widget and additional options are exposed, they can later be added to the palette definitions without requiring the group manager to reconfigure the group banner.&lt;/p&gt;
&lt;h2&gt;&lt;a id="XML_Palette_Definition" name="XML_Palette_Definition"&gt;&lt;/a&gt;XML Palette Definition&lt;/h2&gt;
&lt;pre&gt;[&lt;br /&gt;&amp;lt;paletteType&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;lt;value /&amp;gt;]*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;]*&lt;br /&gt;&amp;lt;/paletteType&amp;gt;&lt;br /&gt;]*&lt;/pre&gt;
&lt;p&gt;One or more palette types can contain one or more palettes each. Each palette can then contain one or more values, of any type.&lt;/p&gt;
&lt;p&gt;Palette values can be retrieved within widgets and the theme using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;widget extension and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/p&gt;
&lt;p&gt;The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_paletteType_gt" name="lt_paletteType_gt"&gt;&lt;/a&gt;&amp;lt;paletteType /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;paletteType id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; &amp;gt;...&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette type.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the name of the palette type&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_palette_gt" name="lt_palette_gt"&gt;&lt;/a&gt;&amp;lt;palette /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;palette id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; [cssClass=""] [previewCss=""] [default=""] &amp;gt;...&amp;lt;/palette&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of selectable palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;&lt;code&gt;themepalette&lt;/code&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the display name for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;cssClass&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional CSS class applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;previewCss&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional inline styling applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;default&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a boolean (&lt;span class="code"&gt;true&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;false&lt;/span&gt;) identifying whether this palette should be the default selection within a palette type when no other palette has been selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_value_gt" name="lt_value_gt"&gt;&lt;/a&gt;&amp;lt;value /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;pre class="code"&gt;&amp;lt;value id=&amp;quot;&amp;quot; dataType=&amp;quot;&amp;quot; &amp;gt;value&amp;lt;/value&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a value within a palette.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for this value. This is the identifier used when retrieving selected palette values via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;extension methods within widgets and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;dataType&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the data type of this value. Possible data types are:
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Int&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is an integer value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;String&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is as a string value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Color&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS color value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Unit&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Double&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a double-precision floating point value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;value&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Exposing_Palette_Selections" name="Exposing_Palette_Selections"&gt;&lt;/a&gt;Exposing Palette Selections&lt;/h2&gt;
&lt;p&gt;Palette selection from a known palette type are usually exposed via [[Supporting Configuration|configuration]] properties in themes and widgets using the &lt;code&gt;themepalette&lt;/code&gt; property template:&lt;/p&gt;
&lt;pre class="MethodOverload"&gt;&amp;lt;property id=&amp;quot;propertyId&amp;quot; labelResourceName=&amp;quot;nameResource&amp;quot; descriptionResourceName=&amp;quot;descriptionResource&amp;quot; dataType=&amp;quot;String&amp;quot; template=&amp;quot;themepalette&amp;quot; paletteTypeId=&amp;quot;paletteTypeId&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The paletteTypeId attribute would be set to the name of the palette type identified by the current contextual theme (or one of its ancestors). This will render the list of palette options and allow for the selection of one of the defined palettes:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x0/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1561135494125v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The value stored will be the palette&amp;#39;s identifier.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Using_Palette_Selections" name="Using_Palette_Selections"&gt;&lt;/a&gt;Using Palette Selections&lt;/h2&gt;
&lt;div class="documentation-member"&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;p&gt;Palettes can be used by&lt;span&gt;&amp;nbsp;[[Scripting|&lt;/span&gt;scripted customizations]]&lt;span&gt;&amp;nbsp;&lt;/span&gt;in server-executed code or LESS files to make use of the configuration values associated to a palette selection using the palette APIs:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In LESS,
&lt;ul&gt;
&lt;li&gt;[[api-documentation:-evo-themepalette-color LESS Function|-evo-themepalette-color]]&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-double LESS Function|&lt;/span&gt;-evo-themepalette-double]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-int LESS Function|&lt;/span&gt;-evo-themepalette-int]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-string LESS Function|&lt;/span&gt;-evo-themepalette-string]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-themepalette-unit LESS Function|&lt;/span&gt;-evo-themepalette-unit]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-color LESS Function|&lt;/span&gt;-evo-widgetpalette-color]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-double LESS Function|&lt;/span&gt;-evo-widgetpalette-double]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-int LESS Function|&lt;/span&gt;-evo-widgetpalette-int]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-string LESS Function|&lt;/span&gt;-evo-widgetpalette-string]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:-evo-widgetpalette-unit LESS Function|&lt;/span&gt;-evo-widgetpalette-unit]]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Velocity and Server-side Javascript,
&lt;ul&gt;
&lt;li&gt;[[api-documentation:core_v2_theme Script API|core_v2_theme.GetPaletteColorValue]]&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteDoubleValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteIntValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteStringValue]]&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;[[api-documentation:core_v2_theme Script API|&lt;/span&gt;core_v2_theme.GetPaletteUnitValue]]&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See&lt;span&gt;&amp;nbsp;&lt;/span&gt;the inline API documentation in Theme Studio, Widget Studio, or Automation Studio for more details.&lt;/p&gt;
&lt;p&gt;When working with values on the server, note the data representation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Palette value data type&lt;/th&gt;
&lt;th&gt;Server data type (.Net)&lt;/th&gt;
&lt;th&gt;Client data type (Javascript)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Int&lt;/th&gt;
&lt;td&gt;Int32&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Color&lt;/td&gt;
&lt;td&gt;String representation of the color: #RRGGBB, #RRGGBBAA, rgb(1-255, 1-255, 1-255), rgba(1-255, 1-255, 1-255, 0-1), hsl(1-255, %, %), hsla(1-255, %, %, 0-1), or a named HTML color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Unit&lt;/td&gt;
&lt;td&gt;String representation of a CSS unit, a px, pt, pc, in, mm, cm, %, em, ex, ch, rem, v2, or vh value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Double&lt;/th&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Using Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes/revision/4</link><pubDate>Mon, 24 Jun 2019 15:08:58 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Revision 4 posted to Developer Training by Ben Tiedt on 06/24/2019 15:08:58&lt;br /&gt;
&lt;p&gt;Theme palettes allow themes to expose sets of configuration options to theme managers to make groups of configuration easier. The theme, widgets, and other scripted customizations can expose options to select a palette from the current theme and retrieve specific values from the theme-defined palette values.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="When_Would_I_Use_Palettes" name="When_Would_I_Use_Palettes"&gt;&lt;/a&gt;When Would I Use Palettes?&lt;/h2&gt;
&lt;p&gt;Palettes are useful to theme developers to allow controlled sets of key/value options to be selected by theme managers as a consolidated option with a unique preview instead of exposing lower-level options that could be overwhelming or abused.&lt;/p&gt;
&lt;p&gt;For example, the site theme defines palettes that can be used for banner styling. These are all predefined by the theme and represent multiple key/value pairs (some stylistic, some functional) that are consolidated behind simpler selectable named options. The theme can add and remove palettes to meet the branding needs of the community (&amp;quot;we only support these colors&amp;quot;, &amp;quot;all banners should look the same&amp;quot;, etc can be implemented by adding/removing banner palettes in theme studio). When a group manager edits the group theme, the group banner widget exposes a palette selection from the list made available by the site theme. The group manager can select the palette and all of the configuration options associated to that selection can be read by the group banner widget to implement the style and behavior of the selection. If customizations are later made to the group banner widget and additional options are exposed, they can later be added to the palette definitions without requiring the group manager to reconfigure the group banner.&lt;/p&gt;
&lt;h2&gt;&lt;a id="XML_Palette_Definition" name="XML_Palette_Definition"&gt;&lt;/a&gt;XML Palette Definition&lt;/h2&gt;
&lt;pre&gt;[&lt;br /&gt;&amp;lt;paletteType&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;lt;value /&amp;gt;]*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;]*&lt;br /&gt;&amp;lt;/paletteType&amp;gt;&lt;br /&gt;]*&lt;/pre&gt;
&lt;p&gt;One or more palette types can contain one or more palettes each. Each palette can then contain one or more values, of any type.&lt;/p&gt;
&lt;p&gt;Palette values can be retrieved within widgets and the theme using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;widget extension and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/p&gt;
&lt;p&gt;The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_paletteType_gt" name="lt_paletteType_gt"&gt;&lt;/a&gt;&amp;lt;paletteType /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;paletteType id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; &amp;gt;...&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette type.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the name of the palette type&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_palette_gt" name="lt_palette_gt"&gt;&lt;/a&gt;&amp;lt;palette /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;palette id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; [cssClass=""] [previewCss=""] [default=""] &amp;gt;...&amp;lt;/palette&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of selectable palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;&lt;code&gt;themepalette&lt;/code&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the display name for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;cssClass&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional CSS class applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;previewCss&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional inline styling applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;default&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a boolean (&lt;span class="code"&gt;true&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;false&lt;/span&gt;) identifying whether this palette should be the default selection within a palette type when no other palette has been selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_value_gt" name="lt_value_gt"&gt;&lt;/a&gt;&amp;lt;value /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;pre class="code"&gt;&amp;lt;value id=&amp;quot;&amp;quot; dataType=&amp;quot;&amp;quot; &amp;gt;value&amp;lt;/value&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a value within a palette.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for this value. This is the identifier used when retrieving selected palette values via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;extension methods within widgets and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;dataType&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the data type of this value. Possible data types are:
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Int&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is an integer value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;String&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is as a string value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Color&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS color value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Unit&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Double&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a double-precision floating point value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;value&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Exposing_Palette_Selections" name="Exposing_Palette_Selections"&gt;&lt;/a&gt;Exposing Palette Selections&lt;/h2&gt;
&lt;p&gt;Palette selection from a known palette type are usually exposed via [[Supporting Configuration|configuration]] properties in themes and widgets using the &lt;code&gt;themepalette&lt;/code&gt; property template:&lt;/p&gt;
&lt;pre class="MethodOverload"&gt;&amp;lt;property id=&amp;quot;propertyId&amp;quot; labelResourceName=&amp;quot;nameResource&amp;quot; descriptionResourceName=&amp;quot;descriptionResource&amp;quot; dataType=&amp;quot;String&amp;quot; template=&amp;quot;themepalette&amp;quot; paletteTypeId=&amp;quot;paletteTypeId&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The paletteTypeId attribute would be set to the name of the palette type identified by the current contextual theme (or one of its ancestors). This will render the list of palette options and allow for the selection of one of the defined palettes:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x0/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1561135494125v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The value stored will be the palette&amp;#39;s identifier.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Using_Palette_Selections" name="Using_Palette_Selections"&gt;&lt;/a&gt;Using Palette Selections&lt;/h2&gt;
&lt;div class="documentation-member"&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;p&gt;Palettes can be used by&lt;span&gt;&amp;nbsp;[[Scripting|&lt;/span&gt;scripted customizations]]&lt;span&gt;&amp;nbsp;&lt;/span&gt;in server-executed code or LESS files to make use of the configuration values associated to a palette selection using the palette APIs:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In LESS,
&lt;ul&gt;
&lt;li&gt;-evo-themepalette-color&lt;/li&gt;
&lt;li&gt;-evo-themepalette-double&lt;/li&gt;
&lt;li&gt;-evo-themepalette-int&lt;/li&gt;
&lt;li&gt;-evo-themepalette-string&lt;/li&gt;
&lt;li&gt;-evo-themepalette-unit&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Velocity and Server-side Javascript,
&lt;ul&gt;
&lt;li&gt;core_v2_theme.GetPaletteColorValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteDoubleValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteIntValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteStringValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteUnitValue&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See&lt;span&gt;&amp;nbsp;&lt;/span&gt;the inline API documentation in Theme Studio, Widget Studio, or Automation Studio for more details.&lt;/p&gt;
&lt;p&gt;When working with values on the server, note the data representation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Palette value data type&lt;/th&gt;
&lt;th&gt;Server data type (.Net)&lt;/th&gt;
&lt;th&gt;Client data type (Javascript)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Int&lt;/th&gt;
&lt;td&gt;Int32&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Color&lt;/td&gt;
&lt;td&gt;String representation of the color: #RRGGBB, #RRGGBBAA, rgb(1-255, 1-255, 1-255), rgba(1-255, 1-255, 1-255, 0-1), hsl(1-255, %, %), hsla(1-255, %, %, 0-1), or a named HTML color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Unit&lt;/td&gt;
&lt;td&gt;String representation of a CSS unit, a px, pt, pc, in, mm, cm, %, em, ex, ch, rem, v2, or vh value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Double&lt;/th&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Working with Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes/revision/3</link><pubDate>Fri, 21 Jun 2019 16:46:41 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Revision 3 posted to Developer Training by Ben Tiedt on 06/21/2019 16:46:41&lt;br /&gt;
&lt;p&gt;Theme palettes allow themes to expose sets of configuration options to theme managers to make groups of configuration easier. The theme, widgets, and other scripted customizations can expose options to select a palette from the current theme and retrieve specific values from the theme-defined palette values.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="When_Would_I_Use_Palettes" name="When_Would_I_Use_Palettes"&gt;&lt;/a&gt;When Would I Use Palettes?&lt;/h2&gt;
&lt;p&gt;Palettes are useful to theme developers to allow controlled sets of key/value options to be selected by theme managers as a consolidated option with a unique preview instead of exposing lower-level options that could be overwhelming or abused.&lt;/p&gt;
&lt;p&gt;For example, the site theme defines palettes that can be used for banner styling. These are all predefined by the theme and represent multiple key/value pairs (some stylistic, some functional) that are consolidated behind simpler selectable named options. The theme can add and remove palettes to meet the branding needs of the community (&amp;quot;we only support these colors&amp;quot;, &amp;quot;all banners should look the same&amp;quot;, etc can be implemented by adding/removing banner palettes in theme studio). When a group manager edits the group theme, the group banner widget exposes a palette selection from the list made available by the site theme. The group manager can select the palette and all of the configuration options associated to that selection can be read by the group banner widget to implement the style and behavior of the selection. If customizations are later made to the group banner widget and additional options are exposed, they can later be added to the palette definitions without requiring the group manager to reconfigure the group banner.&lt;/p&gt;
&lt;h2&gt;&lt;a id="XML_Palette_Definition" name="XML_Palette_Definition"&gt;&lt;/a&gt;XML Palette Definition&lt;/h2&gt;
&lt;pre&gt;[&lt;br /&gt;&amp;lt;paletteType&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;lt;value /&amp;gt;]*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;]*&lt;br /&gt;&amp;lt;/paletteType&amp;gt;&lt;br /&gt;]*&lt;/pre&gt;
&lt;p&gt;One or more palette types can contain one or more palettes each. Each palette can then contain one or more values, of any type.&lt;/p&gt;
&lt;p&gt;Palette values can be retrieved within widgets and the theme using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;widget extension and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/p&gt;
&lt;p&gt;The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_paletteType_gt" name="lt_paletteType_gt"&gt;&lt;/a&gt;&amp;lt;paletteType /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;paletteType id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; &amp;gt;...&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette type.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the name of the palette type&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_palette_gt" name="lt_palette_gt"&gt;&lt;/a&gt;&amp;lt;palette /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;palette id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; [cssClass=""] [previewCss=""] [default=""] &amp;gt;...&amp;lt;/palette&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of selectable palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;&lt;code&gt;themepalette&lt;/code&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the display name for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;cssClass&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional CSS class applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;previewCss&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional inline styling applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;default&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a boolean (&lt;span class="code"&gt;true&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;false&lt;/span&gt;) identifying whether this palette should be the default selection within a palette type when no other palette has been selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_value_gt" name="lt_value_gt"&gt;&lt;/a&gt;&amp;lt;value /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;pre class="code"&gt;&amp;lt;value id=&amp;quot;&amp;quot; dataType=&amp;quot;&amp;quot; &amp;gt;value&amp;lt;/value&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a value within a palette.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for this value. This is the identifier used when retrieving selected palette values via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;extension methods within widgets and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;dataType&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the data type of this value. Possible data types are:
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Int&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is an integer value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;String&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is as a string value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Color&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS color value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Unit&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Double&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a double-precision floating point value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;value&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Exposing_Palette_Selections" name="Exposing_Palette_Selections"&gt;&lt;/a&gt;Exposing Palette Selections&lt;/h2&gt;
&lt;p&gt;Palette selection from a known palette type are usually exposed via [[Supporting Configuration|configuration]] properties in themes and widgets using the &lt;code&gt;themepalette&lt;/code&gt; property template:&lt;/p&gt;
&lt;pre class="MethodOverload"&gt;&amp;lt;property id=&amp;quot;propertyId&amp;quot; labelResourceName=&amp;quot;nameResource&amp;quot; descriptionResourceName=&amp;quot;descriptionResource&amp;quot; dataType=&amp;quot;String&amp;quot; template=&amp;quot;themepalette&amp;quot; paletteTypeId=&amp;quot;paletteTypeId&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The paletteTypeId attribute would be set to the name of the palette type identified by the current contextual theme (or one of its ancestors). This will render the list of palette options and allow for the selection of one of the defined palettes:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/1280x0/__key/communityserver-wikis-components-files/00-00-00-12-83/pastedimage1561135494125v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The value stored will be the palette&amp;#39;s identifier.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Using_Palette_Selections" name="Using_Palette_Selections"&gt;&lt;/a&gt;Using Palette Selections&lt;/h2&gt;
&lt;div class="documentation-member"&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;p&gt;Palettes can be used by&lt;span&gt;&amp;nbsp;[[Scripting|&lt;/span&gt;scripted customizations]]&lt;span&gt;&amp;nbsp;&lt;/span&gt;in server-executed code or LESS files to make use of the configuration values associated to a palette selection using the palette APIs:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In LESS,
&lt;ul&gt;
&lt;li&gt;-evo-themepalette-color&lt;/li&gt;
&lt;li&gt;-evo-themepalette-double&lt;/li&gt;
&lt;li&gt;-evo-themepalette-int&lt;/li&gt;
&lt;li&gt;-evo-themepalette-string&lt;/li&gt;
&lt;li&gt;-evo-themepalette-unit&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Velocity and Server-side Javascript,
&lt;ul&gt;
&lt;li&gt;core_v2_theme.GetPaletteColorValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteDoubleValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteIntValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteStringValue&lt;/li&gt;
&lt;li&gt;core_v2_theme.GetPaletteUnitValue&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See&lt;span&gt;&amp;nbsp;&lt;/span&gt;the inline API documentation in Theme Studio, Widget Studio, or Automation Studio for more details.&lt;/p&gt;
&lt;p&gt;When working with values on the server, note the data representation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Palette value data type&lt;/th&gt;
&lt;th&gt;Server data type (.Net)&lt;/th&gt;
&lt;th&gt;Client data type (Javascript)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Int&lt;/th&gt;
&lt;td&gt;Int32&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Color&lt;/td&gt;
&lt;td&gt;String representation of the color: #RRGGBB, #RRGGBBAA, rgb(1-255, 1-255, 1-255), rgba(1-255, 1-255, 1-255, 0-1), hsl(1-255, %, %), hsla(1-255, %, %, 0-1), or a named HTML color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Unit&lt;/td&gt;
&lt;td&gt;String representation of a CSS unit, a px, pt, pc, in, mm, cm, %, em, ex, ch, rem, v2, or vh value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Double&lt;/th&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Working with Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes/revision/2</link><pubDate>Fri, 21 Jun 2019 16:38:25 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Revision 2 posted to Developer Training by Ben Tiedt on 06/21/2019 16:38:25&lt;br /&gt;
&lt;p&gt;Theme palettes allow themes to expose sets of configuration options to theme managers to make groups of configuration easier. The theme, widgets, and other scripted customizations can expose options to select a palette from the current theme and retrieve specific values from the theme-defined palette values.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="When_Would_I_Use_Palettes" name="When_Would_I_Use_Palettes"&gt;&lt;/a&gt;When Would I Use Palettes?&lt;/h2&gt;
&lt;p&gt;Palettes are useful to theme developers to allow controlled sets of key/value options to be selected by theme managers as a consolidated option with a unique preview instead of exposing lower-level options that could be overwhelming or abused.&lt;/p&gt;
&lt;p&gt;For example, the site theme defines palettes that can be used for banner styling. These are all predefined by the theme and represent multiple key/value pairs (some stylistic, some functional) that are consolidated behind simpler selectable named options. The theme can add and remove palettes to meet the branding needs of the community (&amp;quot;we only support these colors&amp;quot;, &amp;quot;all banners should look the same&amp;quot;, etc can be implemented by adding/removing banner palettes in theme studio). When a group manager edits the group theme, the group banner widget exposes a palette selection from the list made available by the site theme. The group manager can select the palette and all of the configuration options associated to that selection can be read by the group banner widget to implement the style and behavior of the selection. If customizations are later made to the group banner widget and additional options are exposed, they can later be added to the palette definitions without requiring the group manager to reconfigure the group banner.&lt;/p&gt;
&lt;h2&gt;&lt;a id="XML_Palette_Definition" name="XML_Palette_Definition"&gt;&lt;/a&gt;XML Palette Definition&lt;/h2&gt;
&lt;pre&gt;[&lt;br /&gt;&amp;lt;paletteType&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;lt;value /&amp;gt;]*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/palette&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;]*&lt;br /&gt;&amp;lt;/paletteType&amp;gt;&lt;br /&gt;]*&lt;/pre&gt;
&lt;p&gt;One or more palette types can contain one or more palettes each. Each palette can then contain one or more values, of any type.&lt;/p&gt;
&lt;p&gt;Palette values can be retrieved within widgets and the theme using the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;widget extension and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/p&gt;
&lt;p&gt;The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_paletteType_gt" name="lt_paletteType_gt"&gt;&lt;/a&gt;&amp;lt;paletteType /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;paletteType id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; &amp;gt;...&amp;lt;/paletteType&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette type.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the name of the palette type&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_palette_gt" name="lt_palette_gt"&gt;&lt;/a&gt;&amp;lt;palette /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;palette id=&amp;quot;&amp;quot; name=&amp;quot;&amp;quot; [cssClass=""] [previewCss=""] [default=""] &amp;gt;...&amp;lt;/palette&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a grouping of selectable palettes. The palettes of a given palette type can be selected in a theme or widget&amp;#39;s configuration with a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;&lt;code&gt;themepalette&lt;/code&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;name&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the display name for the palette.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;cssClass&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional CSS class applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;previewCss&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the optional inline styling applied to the palette option when rendered in a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;themepalette&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;configuration property template.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;default&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a boolean (&lt;span class="code"&gt;true&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="code"&gt;false&lt;/span&gt;) identifying whether this palette should be the default selection within a palette type when no other palette has been selected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="documentation-member"&gt;
&lt;h3 class="member_heading"&gt;&lt;a id="lt_value_gt" name="lt_value_gt"&gt;&lt;/a&gt;&amp;lt;value /&amp;gt;&lt;/h3&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;pre class="code"&gt;&amp;lt;value id=&amp;quot;&amp;quot; dataType=&amp;quot;&amp;quot; &amp;gt;value&amp;lt;/value&amp;gt;&lt;/pre&gt;
&lt;p&gt;Defines a value within a palette.&lt;/p&gt;
&lt;p&gt;Attributes:&lt;/p&gt;
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;id&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the identifier for this value. This is the identifier used when retrieving selected palette values via the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;core_v2_theme&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;extension methods within widgets and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span class="code"&gt;-evo-themepalette-*&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;LESS functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;dataType&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the data type of this value. Possible data types are:
&lt;ul class="parameters"&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Int&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is an integer value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;String&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is as a string value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Color&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS color value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Unit&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a CSS unit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;Double&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is a double-precision floating point value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span class="code"&gt;value&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is the value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Exposing_Palette_Selections" name="Exposing_Palette_Selections"&gt;&lt;/a&gt;Exposing Palette Selections&lt;/h2&gt;
&lt;p&gt;TBD&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;&lt;a id="Using_Palette_Selections" name="Using_Palette_Selections"&gt;&lt;/a&gt;Using Palette Selections&lt;/h2&gt;
&lt;div class="documentation-member"&gt;
&lt;div class="documentation-member-body"&gt;
&lt;div class="MethodOverloads"&gt;
&lt;div class="MethodOverload"&gt;
&lt;p&gt;TBD&lt;/p&gt;
&lt;p&gt;When working with values on the server, note the data representation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Palette value data type&lt;/th&gt;
&lt;th&gt;Server data type (.Net)&lt;/th&gt;
&lt;th&gt;Client data type (Javascript)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Int&lt;/th&gt;
&lt;td&gt;Int32&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;String&lt;/th&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Color&lt;/td&gt;
&lt;td&gt;String representation of the color: #RRGGBB, #RRGGBBAA, rgb(1-255, 1-255, 1-255), rgba(1-255, 1-255, 1-255, 0-1), hsl(1-255, %, %), hsla(1-255, %, %, 0-1), or a named HTML color.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;td&gt;Telligent.Evolution.Extensibility.Configuration.Version1.Unit&lt;/td&gt;
&lt;td&gt;String representation of a CSS unit, a px, pt, pc, in, mm, cm, %, em, ex, ch, rem, v2, or vh value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Double&lt;/th&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;td&gt;Number&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Working with Theme Palettes</title><link>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes/revision/1</link><pubDate>Fri, 21 Jun 2019 14:57:09 GMT</pubDate><guid isPermaLink="false">c9f57206-a67a-4eac-8377-47d04b26071c</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65594/using-theme-palettes#comments</comments><description>Revision 1 posted to Developer Training by Ben Tiedt on 06/21/2019 14:57:09&lt;br /&gt;
&lt;p&gt;Documentation to be defined.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>