<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to set color and alpha of a module inside a template? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/640206#M28890</link>
    <description>&lt;P&gt;Thanks for your assistance!&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2022 12:57:10 GMT</pubDate>
    <dc:creator>RSDigital</dc:creator>
    <dc:date>2022-05-27T12:57:10Z</dc:date>
    <item>
      <title>How to set color and alpha of a module inside a template?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/634333#M28729</link>
      <description>&lt;P&gt;I have a custom module that allows a user to select a background color and opacity. I'd like to have this module available within different section templates, which isn't a problem, but I can't figure out the syntax to set the background color and the opacity from with a %dnd_module%&amp;nbsp; tag. I'm sure I'm missing something simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RSDigital_0-1652807759374.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/66578iC162D694E39B8F50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RSDigital_0-1652807759374.png" alt="RSDigital_0-1652807759374.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 17:16:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/634333#M28729</guid>
      <dc:creator>RSDigital</dc:creator>
      <dc:date>2022-05-17T17:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to set color and alpha of a module inside a template?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/634386#M28731</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/158444"&gt;@RSDigital&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to get it right - you'd like to modify a section by a module? If so - it's gonna be hard.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An easier approach would be to create a custom module instead of a section function. Here's an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Used functions:&lt;/P&gt;
&lt;P&gt;- color function named "background color"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% require_css %}
&amp;lt;style&amp;gt;
.{{name|md5}}{
background-color: rgba({{module.background_color.color|convert_rgb}}, {{module.background_color.opacity//100}});
{# more styling here #}
}
&amp;lt;/style&amp;gt;
{% end_require_css %}

...
&amp;lt;div class="{{name|md5}}"&amp;gt;
{# layout for your whole section #}
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 18:47:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/634386#M28731</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-05-17T18:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set color and alpha of a module inside a template?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/640206#M28890</link>
      <description>&lt;P&gt;Thanks for your assistance!&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 12:57:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-set-color-and-alpha-of-a-module-inside-a-template/m-p/640206#M28890</guid>
      <dc:creator>RSDigital</dc:creator>
      <dc:date>2022-05-27T12:57:10Z</dc:date>
    </item>
  </channel>
</rss>

