Skip to main content

Color Palette Mapping

This document provides an overview of CSS variables mapped by the Theme engine. These variables allow for dynamic theming of your application by utilizing the provided color palette settings. Each variable includes a fallback default value when applicable.

Usage

To use these variables in your CSS, reference them as follows:

color: var(--textHeading, #26201a);

Here is the key-value mapping for the color variables:

General Colors

CSS VariableSourceDescription
--primaryColorgeneralColor.button.button_primaryPrimary button color.
--secondaryColorgeneralColor.text.text_headingHeading text color.
--accentColorgeneralColor.theme.theme_accentAccent color for the theme.
--linkColorgeneralColor.button.button_linkColor for links.
--bgColorgeneralColor.theme.page_backgroundBackground color for pages (default: #f8f8f8).
--pageBackgroundgeneralColor.theme.page_backgroundPage background color.
--themeAccentgeneralColor.theme.theme_accentAccent color for the theme.
--textHeadinggeneralColor.text.text_headingColor for headings.
--textBodygeneralColor.text.text_bodyBody text color.
--textLabelgeneralColor.text.text_labelLabel text color.
--textSecondarygeneralColor.text.text_secondarySecondary text color.
--buttonPrimarygeneralColor.button.button_primaryPrimary button color.
--buttonSecondarygeneralColor.button.button_secondarySecondary button color.
--buttonLinkgeneralColor.button.button_linkLink button color.

Sale Discount Colors

CSS VariableSourceDescription
--saleBadgeBackgroundgeneralColor.sale_discount.sale_badge_backgroundBackground color for sale badges.
--saleBadgeTextgeneralColor.sale_discount.sale_badge_textText color for sale badges.
--saleDiscountTextgeneralColor.sale_discount.sale_discount_textText color for sale discounts.
--saleTimergeneralColor.sale_discount.sale_timerColor for sale timer elements.
CSS VariableSourceDescription
--headerBackgroundgeneralColor.header.header_backgroundBackground color for the header.
--headerNavgeneralColor.header.header_navNavigation text color in the header.
--headerIcongeneralColor.header.header_iconIcon color in the header.
--footerBackgroundgeneralColor.footer.footer_backgroundBackground color for the footer.
--footerBottomBackgroundgeneralColor.footer.footer_bottom_backgroundBottom section background of the footer.
--footerHeadingTextgeneralColor.footer.footer_heading_textHeading text color in the footer.
--footerBodyTextgeneralColor.footer.footer_body_textBody text color in the footer.
--footerIcongeneralColor.footer.footer_iconIcon color in the footer.

Advanced Colors

CSS VariableSourceDescription
--dialogBackgroundadvanceColor.overlay_popup.dialog_backgroungBackground color for dialogs.
--overlayadvanceColor.overlay_popup.overlayOverlay color for popups.
--dividerStokesadvanceColor.divider_stroke_highlight.divider_strokesDivider stroke highlight color.
--highlightColoradvanceColor.overlay_popup.overlayHighlight color for overlays.
--successBackgroundadvanceColor.user_alerts.success_backgroundBackground color for success alerts.
--successTextadvanceColor.user_alerts.success_textText color for success alerts.
--errorBackgroundadvanceColor.user_alerts.error_backgroundBackground color for error alerts.
--errorTextadvanceColor.user_alerts.error_textText color for error alerts.
--informationBackgroundadvanceColor.user_alerts.info_backgroundBackground color for information alerts.
--informationTextadvanceColor.user_alerts.info_textText color for information alerts.

Default Fallbacks

When using these variables, you can specify a fallback value to ensure consistent rendering in case the variable is undefined. For example:

background-color: var(--bgColor, #ffffff);

Was this section helpful?