Overview
Agent UI Color Themes let you customize your embedded agent’s colors to match your brand. You can choose between two approaches: Quick theming — Set just 3 parameters (brightness, seedColor, dynamicSchemeVariant) to generate a harmonious color palette automatically
Precise control — Customize individual color tokens for complete control over every UI element
Both approaches use Material 3’s color system to ensure accessible, harmonious color combinations throughout the agent interface.
Quick Start: Using Color Themes
The fastest way to match your brand is to use the theme system. Specify three parameters, and the SDK automatically generates a complete color palette.Basic Theme Configuration
Theme Parameters
brightness
Values:"light" or "dark"
Sets the overall brightness of the theme. This determines whether the agent uses light backgrounds with dark text or dark backgrounds with light text.
seedColor
Format: Hex color string (e.g.,'#8E004E')
The primary color of your brand. The theme system uses this color to generate a complete, harmonious palette that includes primary, secondary, tertiary, surface, and error colors.
dynamicSchemeVariant
Default:'tonalSpot'
Controls how the color generation algorithm interprets your seed color. Different variants produce different aesthetic styles while maintaining color harmony.
Examples: Seed Color Palettes
Here’s how different brightness settings affect the same seed color:Light Theme with #C42A73
Dark Theme with #C42A73
Dynamic Scheme Variants
ThedynamicSchemeVariant parameter gives you control over the color generation algorithm’s aesthetic interpretation.
| Variant | Description | Best For |
|---|---|---|
tonalSpot | Default Material theme style. Builds pastel palettes with low chroma. | General use, subtle branding |
fidelity | Palettes match seed color closely, even for bright colors (high chroma). | Strong brand color matching |
monochrome | All colors are grayscale, no chroma. | Minimal, professional designs |
neutral | Close to grayscale with a hint of chroma. | Understated, elegant designs |
expressive | Pastel colors with medium chroma. Primary palette’s hue differs from seed for variety. | Playful, diverse color schemes |
content | Almost identical to fidelity. primaryContainer is the seed color. Tertiary is analogous to seed. | Content-focused applications |
rainbow | Playful theme where seed color’s hue doesn’t appear in generated colors. Broader spectrum. | Creative, colorful designs |
fruitSalad | Similar to rainbow. Seed color’s hue typically doesn’t appear in the theme. | Vibrant, energetic designs |
Example: Comparing Variants
Advanced: Customizing Individual Color Tokens
For precise control, you can customize individual color tokens while still using the generation algorithm for others.Partial Customization
Specify key colors likeprimary, secondary, and surface, and let the algorithm generate the rest:
The Surface Token
Thesurface token controls the agent’s background color. Many web pages use white backgrounds, so setting surface to white ensures the agent blends seamlessly.
When generating the palette, the agent background receives a subtle tint by default. Setting
surface explicitly overrides this behavior.Complete Token Customization
For maximum control, you can specify every color token individually. This is best when you have an existing design system or need exact color matching.Full Theme Object
Color Token Reference
Core Color Tokens
brightness
brightness
Indicates whether the theme is
"light" or "dark". This influences how colors are used and perceived. Manually set color values will override the defaults created for light and dark modes.dynamicSchemeVariant
dynamicSchemeVariant
Specifies the algorithm used to generate the color scheme from the
seedColor. See Dynamic Scheme Variants for all available options.seedColor
seedColor
The main color of the theme, used to generate the complete color palette. This should be your brand’s primary color.
primary
primary
The main color used throughout the UI for key interactive elements. Used for the main agent text bubble, primary buttons, thread list, and capability chooser.
surfaceTint
surfaceTint
A color overlay applied to surfaces to indicate elevation.
onPrimary
onPrimary
The color used for text and icons displayed on top of the
primary color.primaryContainer
primaryContainer
A slightly lighter or darker variant of the primary color used for container backgrounds.
onPrimaryContainer
onPrimaryContainer
The color used for text and icons displayed on top of the
primaryContainer color.Secondary & Tertiary Colors
secondary
secondary
A color used to provide visual balance and distinguish elements from primary ones.
onSecondary
onSecondary
The color used for text and icons displayed on top of the
secondary color.secondaryContainer
secondaryContainer
A variant of the secondary color used for container backgrounds.
onSecondaryContainer
onSecondaryContainer
The color used for text and icons displayed on top of the
secondaryContainer color.tertiary
tertiary
An optional color used to provide more visual variety and accent elements.
onTertiary
onTertiary
The color used for text and icons displayed on top of the
tertiary color.tertiaryContainer
tertiaryContainer
A variant of the tertiary color used for container backgrounds.
onTertiaryContainer
onTertiaryContainer
The color used for text and icons displayed on top of the
tertiaryContainer color.Error Colors
error
error
The color used for error messages and warnings.
onError
onError
The color used for text and icons displayed on top of the
error color.errorContainer
errorContainer
A variant of the error color used for error message containers.
onErrorContainer
onErrorContainer
The color used for text and icons displayed on top of the
errorContainer color.Surface Colors
surface
surface
The background color of most of the app’s UI.
onSurface
onSurface
The color used for text and icons displayed on top of the
surface color.surfaceVariant
surfaceVariant
A slightly different variant of the surface color.
surfaceContainerHighest
surfaceContainerHighest
The highest elevation surface container color.
surfaceDim, surfaceBright, surfaceContainerLowest, surfaceContainerLow, surfaceContainer, surfaceContainerHigh
surfaceDim, surfaceBright, surfaceContainerLowest, surfaceContainerLow, surfaceContainer, surfaceContainerHigh
Various surface container colors with different elevation and brightness levels.
Additional Tokens
outlineVariant
outlineVariant
A variant of the outline color.
shadow
shadow
The color used for shadows.
scrim
scrim
The color used for scrims (semi-transparent overlays).
inverseSurface
inverseSurface
An alternate surface color, often used in specific UI sections.
onInverseSurface
onInverseSurface
The color used for text and icons displayed on top of the
inverseSurface color.inversePrimary
inversePrimary
An alternate primary color, typically used with the
inverseSurface.Fixed Color Roles
Fixed Color Roles
primaryFixed, onPrimaryFixed, primaryFixedDim, onPrimaryFixedVariant, secondaryFixed, onSecondaryFixed, secondaryFixedDim, onSecondaryFixedVariant, tertiaryFixed, onTertiaryFixed, tertiaryFixedDim, onTertiaryFixedVariantFixed color roles used in components like navigation bars or tabs that maintain their color even when scrolling.Generate Palettes with Material Theme Builder
To ensure your agent matches your brand, use Google’s Material 3 Theme Builder to generate complete, harmonious color palettes.Using the Web Tool
1
Open Material Theme Builder
Visit Material Theme Builder
2
Choose core colors
Select the primary, secondary, and tertiary colors that represent your brand
3
Export theme
Export the theme in Material Theme (JSON) format
4
Open the JSON file
Open the downloaded
material-theme.json file5
Copy theme objects
Copy the light and dark theme objects from the JSON file
6
Convert to JavaScript
Convert the JSON format to JavaScript (remove quotes from property names):From JSON:To JavaScript:You can use any LLM or text editor to make this conversion quickly.
7
Use in your code
Paste the converted theme object into your code and pass it to
mindset.init()Using the Figma Plugin
The Material Theme Builder plugin for Figma offers additional flexibility for designers who want to make manual adjustments to each color in the generated palette. This allows fine-tuning to perfectly align with your brand’s aesthetic while maintaining color harmony and accessibility.Best Practices
Quick Theming
Start with seed color and variant. Most brands can achieve excellent results by just settingseedColor and dynamicSchemeVariant without touching individual tokens.
Use fidelity for strong brand matching. If your brand has a specific primary color that must be preserved exactly, use dynamicSchemeVariant: 'fidelity'.
Set surface to white for seamless integration. If your website uses white backgrounds, explicitly set surface: "#FFFFFF" so the agent blends naturally.
Test both light and dark modes. Create separate theme objects for light and dark modes and test both thoroughly.
Complete Customization
Use Material Theme Builder. Don’t manually create color palettes—use the builder to ensure proper contrast ratios and color harmony. Maintain accessibility. Ensure sufficient contrast between text and background colors (WCAG AA minimum: 4.5:1 for body text, 3:1 for large text). Create separate light/dark themes. Don’t use the same color values for both modes—each needs its own optimized palette. Document your tokens. Keep a reference of which tokens you’ve customized and why, especially if multiple team members work on the design.Testing
Test with real content. View your theme with actual agent conversations, not just empty states. Check all UI states. Verify colors work for hover states, disabled states, error states, and loading states. Test on different devices. Colors appear differently on various screens—test on mobile, tablet, and desktop. Verify in different lighting. What looks good on a bright screen might not work in dim lighting, and vice versa.Troubleshooting
Colors don’t match my brand
Possible causes:- Using wrong
dynamicSchemeVariant - Seed color is too different from desired final color
- Not setting key tokens manually
dynamicSchemeVariant: 'fidelity' for closer seed color matching. Or manually set primary, secondary, and surface tokens.
Agent doesn’t blend with my website
Possible causes:surfacetoken doesn’t match website background- Theme brightness doesn’t match website theme
- Border colors or shadows stand out
surface to match your website’s background color. Ensure brightness matches your site’s theme. Adjust outline and shadow tokens if needed.
Text is hard to read
Possible causes:- Insufficient contrast between text and background
- Wrong
onPrimary,onSurface, or similar tokens
onPrimary, onSurface, and other “on” tokens provide sufficient contrast.
Theme looks different in dark mode
Possible causes:- Using same color values for light and dark modes
- Manual token values override brightness setting
Colors are too muted or too vibrant
Possible causes:- Wrong
dynamicSchemeVariantfor desired aesthetic - Seed color doesn’t support desired vibrancy
tonalSpot for muted, fidelity or vibrant for more saturated, expressive or rainbow for variety.