<?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 Betreff: More global Colors in Website Theme - fields.json in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1030071#M40364</link>
    <description>&lt;P&gt;Folgende Fehlermeldung tritt auf:&amp;nbsp;&lt;/P&gt;&lt;P&gt;[ERROR] One or more validation failed. Please fix the errors and try again.&lt;BR /&gt;- Valid alternate_names entries are [primary_color, secondary_color, heading_font, body_font] [field: common_colors]&lt;BR /&gt;- alternate_names feature is limited to color and font field types [field: common_colors]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Das ist der Code-Ausschnitt:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
        "label": "Global colors",
        "name": "global_colors",
        "type": "group",
        "children": [
            {
                "label": "Primary",
                "name": "primary",
                "type": "color",
                "alternate_names": ["primary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.primaryColor"
                    }
                },
                "default": {
                    "color": "#2A262B"
                }
            },
            {
                "label": "Secondary",
                "name": "secondary",
                "type": "color",
                "alternate_names": ["secondary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.colors[1]"
                    }
                },
                "default": {
                    "color": "#0F29F2"
                }
            },
            {
                "label": "Common colors",
                "name": "common_colors",
                "type": "group",
                "alternate_names": ["third_color"],
                "default": {},
                "required": false,
                "locked": false,
                "children": [
                    {
                        "name": "light_color",
                        "label": "Light color",
                        "required": false,
                        "locked": false,
                        "inline_help_text": "",
                        "help_text": "",
                        "type": "color",
                        "default": {
                            "color": "#ffffff",
                            "opacity": 100
                        }
                    }
                ]
            }
        ]
    }&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 21 Aug 2024 08:34:41 GMT</pubDate>
    <dc:creator>Torsten_Utz</dc:creator>
    <dc:date>2024-08-21T08:34:41Z</dc:date>
    <item>
      <title>More global Colors in Website Theme - fields.json</title>
      <link>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1029588#M40350</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i want to add more global colors to the fields.json. If I add this the watch command runs into an error. Is it possible to add more than two global colors in the global color group?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 13:04:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1029588#M40350</guid>
      <dc:creator>Torsten_Utz</dc:creator>
      <dc:date>2024-08-20T13:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: More global Colors in Website Theme - fields.json</title>
      <link>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1029702#M40355</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/390719"&gt;@Torsten_Utz&lt;/a&gt;,&amp;nbsp;yes - it's possible to add more colors to the fields.json. You have basically no limits there. If you'd like to add 99 colors for some reason it would be technically possible but not practical for the user &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What error do you get exactly?&lt;BR /&gt;Most common error is that there's another property using the same name&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2024-08-20 um 18.38.51.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/125203i942DECCD51113A28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2024-08-20 um 18.38.51.png" alt="Bildschirmfoto 2024-08-20 um 18.38.51.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Other common issues might be:&lt;/P&gt;
&lt;P&gt;- missing comma somewhere&lt;/P&gt;
&lt;P&gt;- wrongly placed (color)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a very basic JSON for this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[
	{
		"name": "colors",
		"label": "Colors",
		"required": false,
		"locked": false,
		"children": [
			{
				"name": "primary",
				"label": "Primary color",
				"required": false,
				"locked": false,
				"inline_help_text": "",
				"help_text": "",
				"type": "color",
				"default": {
					"color": "#ffffff",
					"opacity": 100
				}
			},
			{
				"name": "secondary",
				"label": "Primary color",
				"required": false,
				"locked": false,
				"inline_help_text": "",
				"help_text": "",
				"type": "color",
				"default": {
					"color": "#ffffff",
					"opacity": 100
				}
			},
			{
				"name": "common_colors",
				"label": "Common colors",
				"required": false,
				"locked": false,
				"children": [
					{
						"name": "light_color",
						"label": "Light color",
						"required": false,
						"locked": false,
						"inline_help_text": "",
						"help_text": "",
						"type": "color",
						"default": {
							"color": "#ffffff",
							"opacity": 100
						}
					},
                    // add more colors here
				],
				"type": "group",
				"inline_help_text": "",
				"help_text": "",
				"default": {}
			}
		],
		"type": "group",
		"inline_help_text": "",
		"help_text": "",
		"default": {}
	}
]
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use use those colors in the theme-override(or any kind of file) do it like this:&lt;BR /&gt;{{ theme.colors.primary.css }}&lt;/P&gt;
&lt;P&gt;{{ theme.colors.secondary.css }}&lt;/P&gt;
&lt;P&gt;{{ theme.colors.common_colors.light_color.css }}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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, 20 Aug 2024 16:46:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1029702#M40355</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-08-20T16:46:24Z</dc:date>
    </item>
    <item>
      <title>Betreff: More global Colors in Website Theme - fields.json</title>
      <link>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1030071#M40364</link>
      <description>&lt;P&gt;Folgende Fehlermeldung tritt auf:&amp;nbsp;&lt;/P&gt;&lt;P&gt;[ERROR] One or more validation failed. Please fix the errors and try again.&lt;BR /&gt;- Valid alternate_names entries are [primary_color, secondary_color, heading_font, body_font] [field: common_colors]&lt;BR /&gt;- alternate_names feature is limited to color and font field types [field: common_colors]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Das ist der Code-Ausschnitt:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
        "label": "Global colors",
        "name": "global_colors",
        "type": "group",
        "children": [
            {
                "label": "Primary",
                "name": "primary",
                "type": "color",
                "alternate_names": ["primary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.primaryColor"
                    }
                },
                "default": {
                    "color": "#2A262B"
                }
            },
            {
                "label": "Secondary",
                "name": "secondary",
                "type": "color",
                "alternate_names": ["secondary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.colors[1]"
                    }
                },
                "default": {
                    "color": "#0F29F2"
                }
            },
            {
                "label": "Common colors",
                "name": "common_colors",
                "type": "group",
                "alternate_names": ["third_color"],
                "default": {},
                "required": false,
                "locked": false,
                "children": [
                    {
                        "name": "light_color",
                        "label": "Light color",
                        "required": false,
                        "locked": false,
                        "inline_help_text": "",
                        "help_text": "",
                        "type": "color",
                        "default": {
                            "color": "#ffffff",
                            "opacity": 100
                        }
                    }
                ]
            }
        ]
    }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Aug 2024 08:34:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1030071#M40364</guid>
      <dc:creator>Torsten_Utz</dc:creator>
      <dc:date>2024-08-21T08:34:41Z</dc:date>
    </item>
    <item>
      <title>Betreff: More global Colors in Website Theme - fields.json</title>
      <link>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1030096#M40368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/390719"&gt;@Torsten_Utz&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DE: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Gruppen können keine alternate_names haben, da dies für Farben und andere Elemente vorgesehen ist.&lt;/P&gt;
&lt;P&gt;Dein Code sollte so aussehen:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EN: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Groups cannot have alternate_names as this is intended for colours and other elements.&lt;/P&gt;
&lt;P&gt;Your code should look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
        "label": "Global colors",
        "name": "global_colors",
        "type": "group",
        "children": [
            {
                "label": "Primary",
                "name": "primary",
                "type": "color",
                "alternate_names": ["primary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.primaryColor"
                    }
                },
                "default": {
                    "color": "#2A262B"
                }
            },
            {
                "label": "Secondary",
                "name": "secondary",
                "type": "color",
                "alternate_names": ["secondary_color"],
                "visibility": {
                    "hidden_subfields": {
                        "opacity": true
                    }
                },
                "inherited_value": {
                    "property_value_paths": {
                        "color": "brand_settings.colors[1]"
                    }
                },
                "default": {
                    "color": "#0F29F2"
                }
            },
            {
                "label": "Common colors",
                "name": "common_colors",
                "type": "group",
                "default": {},
                "required": false,
                "locked": false,
                "children": [
                    {
                        "name": "light_color",
                        "label": "Light color",
                        "required": false,
                        "locked": false,
                        "inline_help_text": "",
                        "help_text": "",
                        "type": "color",
                        "default": {
                            "color": "#ffffff",
                            "opacity": 100
                        }
                    }
                ]
            }
        ]
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&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>Wed, 21 Aug 2024 09:19:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/More-global-Colors-in-Website-Theme-fields-json/m-p/1030096#M40368</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-08-21T09:19:45Z</dc:date>
    </item>
  </channel>
</rss>

