Overview
Color resources in CometChat allow you to maintain a consistent visual identity across your application, providing predefined colors for various UI elements such as text, buttons, backgrounds, alerts, and more. These color definitions adapt seamlessly to light and dark themes, ensuring an optimal user experience across different modes. The color resources are divided into the following categories:- Primary Colors: Define the main theme of the application.
- Neutral Colors: Used for backgrounds, strokes, and secondary UI elements.
- Alert Colors: Highlight states like success, warning, error, or information.
- Text Colors: Used for typography.
- Icon Colors: Define icon appearances.
- Button Colors: Customize button backgrounds, icons, and text.
Usage
Default Colors
CometChat includes predefined color sets for light and dark modes in theres/values
and res/values-night
directories, respectively. These ensure proper visual contrast and accessibility.Example: Light Mode Color Resources
Customizing Colors
You can override the default colors to align them with your application’s branding. Example: Changing the Primary Color Define your custom color in your themes.xml: