Android Theming Overview

Theming system and visual customization for the Agentforce Android SDK.

The SDK lets you customize colors, typography, icons, on-screen text, and light/dark behavior for every UI component in the full-UI chat experience. All theming types live in the package com.salesforce.android.agentforcesdk.components.theme.

Supply a theme once, through AgentforceConfiguration.Builder.setTheming(...). List only the tokens you want to change; everything else keeps its SDK default.

AreaType(s)Scope
ColorsAgentforceColorPalette, AgentforceColorToken271 tokens — 47 foundation plus 224 component-level across 50 component groups.
Font familyAgentforceTypography.copyWithFontFamily(...)Applies your font to all 23 text styles at once.
Per-style typographyTypography.mergeWith(...)Adjust the weight, size, or line height of individual styles.
IconsAgentforceIconType, AgentforceIcon23 replaceable icons, with optional separate light and dark variants.
Display-name stringsAgentforceDisplayNameType45 user-visible strings such as titles, hints, and button labels.
Theme modeAgentforceThemeModeSYSTEM, LIGHT, or DARK.

Shapes, dimensions, and shadows come from the Salesforce SharedUI design system and can also be overridden through AgentforceThemeOverrides or createCustomAgentforceThemeManager(...), using the SharedUI Shapes, Dimensions, and Shadows types.

  1. You describe your theme with AgentforceThemeOverrides (a sparse bag of just the tokens you want to change) or with a fully resolved AgentforceThemeManager.
  2. You pass it to setTheming(...) using the sealed AgentforceTheming type: Default, Overrides, or CustomManager.
  3. The SDK resolves that into an AgentforceThemeManager and publishes it through the LocalAgentforceTheme Compose CompositionLocal.
  4. Every component reads its values from that local, so the UI recomposes when the theme or the device’s light/dark setting changes.

Prefer AgentforceTheming.Overrides. A fully resolved manager carries no “unset” signal, so there is no way to say “leave this one alone.”

PageWhat it covers
Theming guideEnd-to-end walkthrough: supplying a theme, then customizing colors, typography, icons, strings, and theme mode.
AgentforceThemeManagerThe theme contract, the factory functions, and reading theme values in your own components.
AgentforceColorsThe palette class, the default light and dark palettes, the AgentforceColorToken enum, and withOverrides(...).
Color Token ReferenceEvery one of the 271 color tokens, with its fallback and its default light and dark value.
AgentforceTypographyThe 23 text styles with their weights, sizes, and line heights, plus copyWithFontFamily(...).
Custom IconsEvery replaceable icon, its default drawable, and which color token tints it.
Display NamesEvery customizable string, its default text, and where it appears.
Theme ModeLight, dark, or follow the system, and how each mode resolves.
Server-Driven BrandingHow an org can supply a theme centrally, and how it merges with your in-code theme.

If you’re coming from older documentation:

Old nameUse instead
AgentforceColorsNever a type — it was the file name. The types are AgentforceColorPalette, AgentforceLightColors, AgentforceDarkColors, and AgentforceColorToken.
AgentforceThemeCreatorcreateDefaultAgentforceThemeManager() or createCustomAgentforceThemeManager(...).
DefaultAgentforceThemecreateDefaultAgentforceThemeManager().
Typography (base class)AgentforceTypography, with Typography.mergeWith(...) for per-style overrides.
SalesforceTextFontScaleInternal to the SDK. Font scaling now follows the device’s font-scale setting automatically.
AgentforceSpacing, Spacing, Spacing (Styles)Internal to the SDK. Override spacing through the SharedUI Dimensions type instead.
setThemeManager(...) / setThemeOverrides(...)setTheming(...) with AgentforceTheming.

AgentforceThemeManager is an interface with read-only accessors. You can’t construct it directly and there are no setter methods — build one with createCustomAgentforceThemeManager(...), which takes every theme property as a defaulted parameter.