Using color theme
You can apply a harmonious color theme to the agent UI by just altering 3 parameters:brightness
, seedColor
, and dynamicSchemeVariant
.
It allows you to quickly set a color theme for the agent UI without having to customize each color token individually, and match your brand colors.
Set the theme parameters
In order to apply a color theme to the agent UI, you need to pass atheme
parameter to the mindset.init()
method:
Adjust your theme palette
With only 3 key parameters, you can generate harmonious color palettes. Thetheme
object looks like this:
brightness
brightness
parameter can be either "light"
or "dark"
. It is used to set the overall brightness of the theme.seedColor
seedColor
parameter is the main color of the theme, and it is used to generate the other colors of the palette.dynamicSchemeVariant
dynamicSchemeVariant
parameter is used to influence the color generation algorithm, see the Play with the dynamicSchemeVariant option section below for more details.Examples of theme palette using only seedColor

#C42A73 - Light Theme

#C42A73 - Dark Theme
Play with the dynamicSchemeVariant option
The core purpose ofdynamicSchemeVariant
is to allow you to select a specific aesthetic interpretation or “flavor” of the automatically generated color scheme.
The dynamicSchemeVariant
can take one of the following values:
Value | Description |
---|---|
tonalSpot | Default for Material theme colors. Builds pastel palettes with a low chroma. |
fidelity | The resulting color palettes match seed color, even if the seed color is very bright (high chroma). |
monochrome | All colors are grayscale, no chroma. |
neutral | Close to grayscale, a hint of chroma. |
expressive | Pastel colors, medium chroma palettes. The primary palette’s hue is different from the seed color, for variety. |
content | Almost identical to fidelity. Tokens and palettes match the seed color. ColorScheme.primaryContainer is the seed color, adjusted to ensure contrast with surfaces. The tertiary palette is analogue of the seed color. |
rainbow | A playful theme where the seed color’s hue does not appear in the theme’s generated colors. It aims for a broader spectrum of hues. |
fruitSalad | Another playful theme, similar to rainbow , where the seed color’s hue also typically does not appear in the generated theme. |
Customizing the color values of each color token used in the agent UI
To achieve the best and most predictable results, you can precisely configure the color of each token in your palette. (See the All available color tokens section ). You can also choose to specify only key colors such asprimary
, secondary
and surface
and the rest of the colour palette will be generated using the dynamicSchemeVariant
and the generation algorithm.
The surface
token
When generating the color palette, the agent background color will be set with a tint.
Many web pages use the white
color as the background, in which case you can set the surface
token to white
to ensure the agent UI blends seamlessly with the page background.
You can of course set the surface
token to any color you want.
All available color tokens
When configuring individually all tokens, the finaltheme
object which is passed to the mindset.init()
method looks like this:
Tools you can use to generate a color palette
To ensure your agent’s UI effectively matches your brand, we recommend using Google’s Material 3 theme builder to generate a usable color palette. This web-based tool is easily accessible to developers and designers, and provides a robust starting point. For those working in Figma, the Material Theme Builder plugin for Figma offers the added flexibility to make further manual adjustments to each color in the generated palette. This allows for fine-tuning to perfectly align with your brand’s aesthetic. By leveraging these tools, you can create a consistent and brand-aligned visual experience across your agent’s user interface, enabling your customers to easily recognize and connect with your brand.Google’s Material 3 theme builder
Visit the Material Theme Builder website

Choose the core colors
Export the theme
Open the material-theme.json file
light
and dark
theme objects from the material-theme.json
file.Convert from JSON to Javascript
Paste the theme object in your code
mindset.init()
method.Detailed breakdown of the color tokens
brightness
brightness
surface
is set to black in dark mode and white in light mode, but if a specific surface color is used then this will be used regardless of what dark and light determine.dynamicSchemeVariant
dynamicSchemeVariant
seedColor
.Check the Play with the dynamicSchemeVariant option section above for more details.seedColor
seedColor
seedColor
parameter is the main color of the theme, and it is used to generate the other colors of the palette.primary
primary
surface
surface
surfaceTint
surfaceTint
onPrimary
onPrimary
primary
color.primaryContainer
primaryContainer
primary
color used for container backgrounds.onPrimaryContainer
onPrimaryContainer
primaryContainer
color.secondary
secondary
onSecondary
onSecondary
secondary
color.secondaryContainer
secondaryContainer
secondary
color used for container backgrounds.onSecondaryContainer
onSecondaryContainer
secondaryContainer
color.tertiary
tertiary
onTertiary
onTertiary
tertiary
color.tertiaryContainer
tertiaryContainer
tertiary
color used for container backgrounds.onTertiaryContainer
onTertiaryContainer
tertiaryContainer
color.error
error
onError
onError
error
color.errorContainer
errorContainer
error
color used for error message containers.onErrorContainer
onErrorContainer
errorContainer
color.onSurface
onSurface
surface
color.surfaceVariant
surfaceVariant
surface
color.surfaceContainerHighest
surfaceContainerHighest
outlineVariant
outlineVariant
outline
color.shadow
shadow
scrim
scrim
inverseSurface
inverseSurface
onInverseSurface
onInverseSurface
inverseSurface
color.inversePrimary
inversePrimary
inverseSurface
.primaryFixed, onPrimaryFixed, primaryFixedDim, onPrimaryFixedVariant, secondaryFixed, onSecondaryFixed, secondaryFixedDim, onSecondaryFixedVariant, tertiaryFixed, onTertiaryFixed, tertiaryFixedDim, onTertiaryFixedVariant
primaryFixed, onPrimaryFixed, primaryFixedDim, onPrimaryFixedVariant, secondaryFixed, onSecondaryFixed, secondaryFixedDim, onSecondaryFixedVariant, tertiaryFixed, onTertiaryFixed, tertiaryFixedDim, onTertiaryFixedVariant
surfaceDim, surfaceBright, surfaceContainerLowest, surfaceContainerLow, surfaceContainer, surfaceContainerHigh
surfaceDim, surfaceBright, surfaceContainerLowest, surfaceContainerLow, surfaceContainer, surfaceContainerHigh