Learn how to use brand settings, such as logos and brand colors, within a theme or across HubL/HTML and CSS files.
{{brand_settings.*}}
HubL variables in HTML/HubL and CSS files, as well as theme and module field configuration files (fields.json
).
Below, learn about the available brand setting variables along with examples of implementation.
Setting | Variables |
---|---|
Primary color | {{brand_settings.primaryColor}} {{brand_settings.colors[0]}} |
Secondary color | {{brand_settings.secondaryColor}} |
Accent colors | {{brand_settings.accentColor1}} {{brand_settings.accentColor2}} {{brand_settings.accentColor3}} |
Additional colors | {{brand_settings.colors[1-19]}} |
Primary logo | {{brand_settings.primaryLogo}} {{brand_settings.logos[0]}} |
Domain logo (with fallback) | {{brand_settings.logo}} |
Secondary logo | {{brand_settings.logos[1]}} {{brand_settings.logos[0]}} |
Additional logos | {{brand_settings.logos[1-19]}} |
Primary favicon | {{brand_settings.primaryFavicon}} {{brand_settings.favicons[0]}} |
Additional favicons | {{brand_settings.favicons[1-19]}} |
Domain favicon (with fallback) | {{brand_settings.favicon}} |
hex
filter to access the color’s hex value.src
and width
.src
filter to access the favicon image source URL.fields.json
and HTML/HubL/CSS files:
fields.json
file, include brand_settings.*
values within the inherited_value
and property_value_paths
fields. This configures the module or theme to use the brand kit settings by default. Users will be able to edit these values as needed in the theme settings editor. When no settings are found, HubSpot will fall back to the default
field values.fields.json
files.brand_settings.*
values within HubL tokens (e.g., {{brand_settings.primaryColor}}
). Values will be hardcoded and cannot be modified by users in HubSpot.fields.json
files and in HTML/HubL and CSS files.
Setting | Tokens |
---|---|
Primary color | {{brand_settings.primaryColor}} {{brand_settings.colors[0]}} |
Secondary color | {{brand_settings.secondaryColor}} |
Accent colors | {{brand_settings.accentColor1}} {{brand_settings.accentColor2}} {{brand_settings.accentColor3}} |
Additional colors | {{brand_settings.colors[1-19]}} |
hex
filter is available if you need to directly access the color’s hex code (see CSS example below).
secondaryColor
falls back to the first additional color (colors[1]
).accentColor1
falls back to the second additional color (colors[2]
).accentColor2
falls back to the third additional color (colors[3]
).accentColor3
falls back to the fourth additional color (colors[4]
).colors[3]
) will fall back to the default
value. If there is no default property color set, primaryColor
will be used.fields.json
files, as well as within HTML/HubL and CSS files.
Setting | Tokens |
---|---|
Primary logo | {{brand_settings.primaryLogo}} {{brand_settings.logos[0]}} |
Secondary logo | {{brand_settings.logos[1]}} {{brand_settings.logos[0]}} |
Additional logos | {{brand_settings.logos[1-19]}} |
Domain logo (with fallback) | {{brand_settings.logo}} |
{{brand_settings.primaryLogo.link}}
{{brand_settings.primaryLogo.alt}}
{{brand_settings.primaryLogo.height}}
{{brand_settings.primaryLogo.width}}
{{brand_settings.primaryLogo.src}}
{{brand_settings.logo}}
variable will render the logo set for the domain. If no logo is set for the domain, it will render the primary logo instead.
Setting | Tokens |
---|---|
Primary favicon | {{brand_settings.primaryFavicon}} {{brand_settings.favicons[0]}} |
Additional favicons | {{brand_settings.favicons[1-19]}} |
Domain favicon (with fallback) | {{brand_settings.favicon}} |
src
filter is available if you need to access the favicon image’s source URL. For example: {{brand_settings.favicon.src}}
.
{{brand_settings.favicon}}
variable will render the favicon set for the domain. If no favicon is set for the domain, it will render the primary favicon instead.