AI Integration Quick Reference
AI Integration Quick Reference
| Field | Value |
|---|---|
| Platform | iOS UI Kit |
| Theme Class | CometChatTheme |
| Primary Color | CometChatTheme.primaryColor — Main brand color (#6852D6 default) |
| Background Colors | backgroundColor01, backgroundColor02, backgroundColor03 |
| Text Colors | textColorPrimary, textColorSecondary, textColorTertiary |
| Alert Colors | successColor, errorColor, warningColor, infoColor |
| Dark Mode | Use UIColor { traitCollection in } for dynamic colors |
| Apply Timing | Set theme before CometChatUIKit.init() |
Overview
CometChat UI Kit usesCometChatTheme to manage colors across all components. Colors automatically adapt to Light and Dark mode, ensuring a consistent experience.
- Light Mode
- Dark Mode

Color Categories
| Category | Purpose | Examples |
|---|---|---|
| Primary | Main brand color, buttons, links | primaryColor |
| Background | Screen and component backgrounds | backgroundColor01, backgroundColor02 |
| Text | Typography colors | textColorPrimary, textColorSecondary |
| Border | Dividers and outlines | borderColorLight, borderColorDark |
| Alert | Status indicators | successColor, errorColor, warningColor |
| Icon | Icon tints | iconColorPrimary, iconColorSecondary |
Quick Start
Access Default Colors
- Swift
Customize Theme Colors
Change Primary Color (Brand Color)
- Swift
Complete Theme Customization
- Swift
Dark Mode Support
CometChat automatically adapts to system appearance. You can also customize dark mode colors:- Swift
Color Reference
Primary Colors
| Property | Light Mode | Dark Mode | Usage |
|---|---|---|---|
primaryColor | #6852D6 | #6852D6 | Buttons, links, accents |
Background Colors
| Property | Light Mode | Dark Mode | Usage |
|---|---|---|---|
backgroundColor01 | #FFFFFF | #141414 | Main background |
backgroundColor02 | #F5F5F5 | #1E1E1E | Secondary background |
backgroundColor03 | #EEEEEE | #2C2C2C | Tertiary background |
Text Colors
| Property | Light Mode | Dark Mode | Usage |
|---|---|---|---|
textColorPrimary | #141414 | #FFFFFF | Main text |
textColorSecondary | #727272 | #A0A0A0 | Secondary text |
textColorTertiary | #A0A0A0 | #727272 | Hints, placeholders |
Alert Colors
| Property | Color | Usage |
|---|---|---|
successColor | #09C26F | Success states |
errorColor | #F44649 | Errors, missed calls |
warningColor | #FFAB00 | Warnings |
infoColor | #2196F3 | Information |
Border Colors
| Property | Light Mode | Dark Mode | Usage |
|---|---|---|---|
borderColorLight | #E8E8E8 | #2C2C2C | Subtle borders |
borderColorDark | #CCCCCC | #404040 | Prominent borders |
Production Example
Complete app with custom branding:- Swift
Related
Component Styling
Style individual components
Theme Introduction
Complete theming guide
Getting Started
Initial setup
