HatangChatTheme
data class HatangChatTheme(val isDark: Boolean, val palette: HatangPalette, val accent: Color, val onAccent: Color = Color(HatangContrast.onAccentFor(accent.toArgb())), val fontFamily: FontFamily? = null, val bubbleRadius: Dp = HatangRadius.lg, val mineBubble: Color? = null, val onMineBubble: Color? = null, val theirBubble: Color? = null, val onTheirBubble: Color? = null)
Colours and shapes of the chat UI. By default the SDK derives one from the site's brand colour (fromSite); hosts may pass their own to HatangConfig(theme = …, darkTheme = …).
Constructors
Link copied to clipboard
constructor(isDark: Boolean, palette: HatangPalette, accent: Color, onAccent: Color = Color(HatangContrast.onAccentFor(accent.toArgb())), fontFamily: FontFamily? = null, bubbleRadius: Dp = HatangRadius.lg, mineBubble: Color? = null, onMineBubble: Color? = null, theirBubble: Color? = null, onTheirBubble: Color? = null)
Properties
Link copied to clipboard
The accent as a text colour on the chat's backgrounds (quick replies, outlined buttons, links, prices): the site colour itself when it reads at WCAG AA (4.5:1) on the page, card and bubble backgrounds, otherwise the nearest darker (light) or lighter (dark) shade that does.
Link copied to clipboard
Bubble corner radius.
Link copied to clipboard
Font family for every text (null: the system font).
Link copied to clipboard
Own bubble background (default: accent).
Link copied to clipboard
Own bubble text (default: onAccent).
Link copied to clipboard
Their bubble text (default: fg).
Link copied to clipboard
Base colours.
Link copied to clipboard
Their bubble background (default: the raised surface).