This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 55).
Expo Router Color
An Expo Router API for accessing platform-specific native colors.
The Color API provides access to platform-specific native colors.
See the Expo Router reference for installation and configuration.
Usage
import { Color } from 'expo-router'; import { Text, View, useColorScheme } from 'react-native'; export default function MyComponent() { useColorScheme(); return ( <View style={{ flex: 1, backgroundColor: Color.android.dynamic.primary }}> <Text style={{ color: Color.ios.label }}>Hello</Text> </View> ); }
API
import { Color } from 'expo-router';
Constants
Type: ColorType
Color utility to access platform-specific colors easily.
On Android, it provides access to:
- System colors, as a type-safe wrapper over
PlatformColor. For example,Color.android.background. - Attribute colors, as a type-safe wrapper over
PlatformColor. For example,Color.android.attr.colorPrimary. - Material Design 3 static colors. For example,
Color.android.material.primary. - Material Design 3 dynamic colors. For example,
Color.android.dynamic.primary.
On iOS, it is a type-safe wrapper over PlatformColor, providing access to system colors. For example, Color.ios.label.
Note: To ensure the colors align with the system theme on Android, make sure they are used within a component that responds to theme changes, such as by using the
useColorSchemehook from React Native. This is especially important when using React Compiler, which can memoize components.
Example
import { Color } from 'expo-router'; Color.ios.label; // Access iOS system color Color.android.background; // Access Android system color Color.android.attr.colorPrimary; // Access Android attribute color Color.android.material.primary; // Access Android Material Design 3 static color Color.android.dynamic.primary; // Access Android Material Design 3 dynamic color
Example
import { Color } from 'expo-router'; import { View, Text, useColorScheme } from 'react-native'; export default function MyComponent() { useColorScheme(); // Ensure the app responds to system theme changes return ( <View style={{ flex: 1, backgroundColor: Color.android.dynamic.primary }}> <Text style={{ color: Color.android.dynamic.onPrimary }}> Hello, World! </Text> </View> ); }
Interfaces
| Property | Type | Description |
|---|---|---|
| background_dark | ColorValue | PlatformColor("@android:color/background_dark") |
| background_light | ColorValue | PlatformColor("@android:color/background_light") |
| black | ColorValue | PlatformColor("@android:color/black") |
| darker_gray | ColorValue | PlatformColor("@android:color/darker_gray") |
| tab_indicator_text | ColorValue | PlatformColor("@android:color/tab_indicator_text") |
| transparent | ColorValue | PlatformColor("@android:color/transparent") |
| white | ColorValue | PlatformColor("@android:color/white") |
| widget_edittext_dark | ColorValue | PlatformColor("@android:color/widget_edittext_dark") |
| Property | Type | Description |
|---|---|---|
| holo_blue_bright | ColorValue | PlatformColor("@android:color/holo_blue_bright") |
| holo_blue_dark | ColorValue | PlatformColor("@android:color/holo_blue_dark") |
| holo_blue_light | ColorValue | PlatformColor("@android:color/holo_blue_light") |
| holo_green_dark | ColorValue | PlatformColor("@android:color/holo_green_dark") |
| holo_green_light | ColorValue | PlatformColor("@android:color/holo_green_light") |
| holo_orange_dark | ColorValue | PlatformColor("@android:color/holo_orange_dark") |
| holo_orange_light | ColorValue | PlatformColor("@android:color/holo_orange_light") |
| holo_purple | ColorValue | PlatformColor("@android:color/holo_purple") |
| holo_red_dark | ColorValue | PlatformColor("@android:color/holo_red_dark") |
| holo_red_light | ColorValue | PlatformColor("@android:color/holo_red_light") |
| Property | Type | Description |
|---|---|---|
| system_accent1_0 | ColorValue | PlatformColor("@android:color/system_accent1_0") |
| system_accent1_10 | ColorValue | PlatformColor("@android:color/system_accent1_10") |
| system_accent1_100 | ColorValue | PlatformColor("@android:color/system_accent1_100") |
| system_accent1_1000 | ColorValue | PlatformColor("@android:color/system_accent1_1000") |
| system_accent1_200 | ColorValue | PlatformColor("@android:color/system_accent1_200") |
| system_accent1_300 | ColorValue | PlatformColor("@android:color/system_accent1_300") |
| system_accent1_400 | ColorValue | PlatformColor("@android:color/system_accent1_400") |
| system_accent1_50 | ColorValue | PlatformColor("@android:color/system_accent1_50") |
| system_accent1_500 | ColorValue | PlatformColor("@android:color/system_accent1_500") |
| system_accent1_600 | ColorValue | PlatformColor("@android:color/system_accent1_600") |
| system_accent1_700 | ColorValue | PlatformColor("@android:color/system_accent1_700") |
| system_accent1_800 | ColorValue | PlatformColor("@android:color/system_accent1_800") |
| system_accent1_900 | ColorValue | PlatformColor("@android:color/system_accent1_900") |
| system_accent2_0 | ColorValue | PlatformColor("@android:color/system_accent2_0") |
| system_accent2_10 | ColorValue | PlatformColor("@android:color/system_accent2_10") |
| system_accent2_100 | ColorValue | PlatformColor("@android:color/system_accent2_100") |
| system_accent2_1000 | ColorValue | PlatformColor("@android:color/system_accent2_1000") |
| system_accent2_200 | ColorValue | PlatformColor("@android:color/system_accent2_200") |
| system_accent2_300 | ColorValue | PlatformColor("@android:color/system_accent2_300") |
| system_accent2_400 | ColorValue | PlatformColor("@android:color/system_accent2_400") |
| system_accent2_50 | ColorValue | PlatformColor("@android:color/system_accent2_50") |
| system_accent2_500 | ColorValue | PlatformColor("@android:color/system_accent2_500") |
| system_accent2_600 | ColorValue | PlatformColor("@android:color/system_accent2_600") |
| system_accent2_700 | ColorValue | PlatformColor("@android:color/system_accent2_700") |
| system_accent2_800 | ColorValue | PlatformColor("@android:color/system_accent2_800") |
| system_accent2_900 | ColorValue | PlatformColor("@android:color/system_accent2_900") |
| system_accent3_0 | ColorValue | PlatformColor("@android:color/system_accent3_0") |
| system_accent3_10 | ColorValue | PlatformColor("@android:color/system_accent3_10") |
| system_accent3_100 | ColorValue | PlatformColor("@android:color/system_accent3_100") |
| system_accent3_1000 | ColorValue | PlatformColor("@android:color/system_accent3_1000") |
| system_accent3_200 | ColorValue | PlatformColor("@android:color/system_accent3_200") |
| system_accent3_300 | ColorValue | PlatformColor("@android:color/system_accent3_300") |
| system_accent3_400 | ColorValue | PlatformColor("@android:color/system_accent3_400") |
| system_accent3_50 | ColorValue | PlatformColor("@android:color/system_accent3_50") |
| system_accent3_500 | ColorValue | PlatformColor("@android:color/system_accent3_500") |
| system_accent3_600 | ColorValue | PlatformColor("@android:color/system_accent3_600") |
| system_accent3_700 | ColorValue | PlatformColor("@android:color/system_accent3_700") |
| system_accent3_800 | ColorValue | PlatformColor("@android:color/system_accent3_800") |
| system_accent3_900 | ColorValue | PlatformColor("@android:color/system_accent3_900") |
| system_neutral1_0 | ColorValue | PlatformColor("@android:color/system_neutral1_0") |
| system_neutral1_10 | ColorValue | PlatformColor("@android:color/system_neutral1_10") |
| system_neutral1_100 | ColorValue | PlatformColor("@android:color/system_neutral1_100") |
| system_neutral1_1000 | ColorValue | PlatformColor("@android:color/system_neutral1_1000") |
| system_neutral1_200 | ColorValue | PlatformColor("@android:color/system_neutral1_200") |
| system_neutral1_300 | ColorValue | PlatformColor("@android:color/system_neutral1_300") |
| system_neutral1_400 | ColorValue | PlatformColor("@android:color/system_neutral1_400") |
| system_neutral1_50 | ColorValue | PlatformColor("@android:color/system_neutral1_50") |
| system_neutral1_500 | ColorValue | PlatformColor("@android:color/system_neutral1_500") |
| system_neutral1_600 | ColorValue | PlatformColor("@android:color/system_neutral1_600") |
| system_neutral1_700 | ColorValue | PlatformColor("@android:color/system_neutral1_700") |
| system_neutral1_800 | ColorValue | PlatformColor("@android:color/system_neutral1_800") |
| system_neutral1_900 | ColorValue | PlatformColor("@android:color/system_neutral1_900") |
| system_neutral2_0 | ColorValue | PlatformColor("@android:color/system_neutral2_0") |
| system_neutral2_10 | ColorValue | PlatformColor("@android:color/system_neutral2_10") |
| system_neutral2_100 | ColorValue | PlatformColor("@android:color/system_neutral2_100") |
| system_neutral2_1000 | ColorValue | PlatformColor("@android:color/system_neutral2_1000") |
| system_neutral2_200 | ColorValue | PlatformColor("@android:color/system_neutral2_200") |
| system_neutral2_300 | ColorValue | PlatformColor("@android:color/system_neutral2_300") |
| system_neutral2_400 | ColorValue | PlatformColor("@android:color/system_neutral2_400") |
| system_neutral2_50 | ColorValue | PlatformColor("@android:color/system_neutral2_50") |
| system_neutral2_500 | ColorValue | PlatformColor("@android:color/system_neutral2_500") |
| system_neutral2_600 | ColorValue | PlatformColor("@android:color/system_neutral2_600") |
| system_neutral2_700 | ColorValue | PlatformColor("@android:color/system_neutral2_700") |
| system_neutral2_800 | ColorValue | PlatformColor("@android:color/system_neutral2_800") |
| system_neutral2_900 | ColorValue | PlatformColor("@android:color/system_neutral2_900") |
| Property | Type | Description |
|---|---|---|
| system_background_dark | ColorValue | PlatformColor("@android:color/system_background_dark") |
| system_background_light | ColorValue | PlatformColor("@android:color/system_background_light") |
| system_control_activated_dark | ColorValue | PlatformColor("@android:color/system_control_activated_dark") |
| system_control_activated_light | ColorValue | PlatformColor("@android:color/system_control_activated_light") |
| system_control_highlight_dark | ColorValue | PlatformColor("@android:color/system_control_highlight_dark") |
| system_control_highlight_light | ColorValue | PlatformColor("@android:color/system_control_highlight_light") |
| system_control_normal_dark | ColorValue | PlatformColor("@android:color/system_control_normal_dark") |
| system_control_normal_light | ColorValue | PlatformColor("@android:color/system_control_normal_light") |
| system_error_container_dark | ColorValue | PlatformColor("@android:color/system_error_container_dark") |
| system_error_container_light | ColorValue | PlatformColor("@android:color/system_error_container_light") |
| system_error_dark | ColorValue | PlatformColor("@android:color/system_error_dark") |
| system_error_light | ColorValue | PlatformColor("@android:color/system_error_light") |
| system_on_background_dark | ColorValue | PlatformColor("@android:color/system_on_background_dark") |
| system_on_background_light | ColorValue | PlatformColor("@android:color/system_on_background_light") |
| system_on_error_container_dark | ColorValue | PlatformColor("@android:color/system_on_error_container_dark") |
| system_on_error_container_light | ColorValue | PlatformColor("@android:color/system_on_error_container_light") |
| system_on_error_dark | ColorValue | PlatformColor("@android:color/system_on_error_dark") |
| system_on_error_light | ColorValue | PlatformColor("@android:color/system_on_error_light") |
| system_on_primary_container_dark | ColorValue | PlatformColor("@android:color/system_on_primary_container_dark") |
| system_on_primary_container_light | ColorValue | PlatformColor("@android:color/system_on_primary_container_light") |
| system_on_primary_dark | ColorValue | PlatformColor("@android:color/system_on_primary_dark") |
| system_on_primary_fixed | ColorValue | PlatformColor("@android:color/system_on_primary_fixed") |
| system_on_primary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_primary_fixed_variant") |
| system_on_primary_light | ColorValue | PlatformColor("@android:color/system_on_primary_light") |
| system_on_secondary_container_dark | ColorValue | PlatformColor("@android:color/system_on_secondary_container_dark") |
| system_on_secondary_container_light | ColorValue | PlatformColor("@android:color/system_on_secondary_container_light") |
| system_on_secondary_dark | ColorValue | PlatformColor("@android:color/system_on_secondary_dark") |
| system_on_secondary_fixed | ColorValue | PlatformColor("@android:color/system_on_secondary_fixed") |
| system_on_secondary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_secondary_fixed_variant") |
| system_on_secondary_light | ColorValue | PlatformColor("@android:color/system_on_secondary_light") |
| system_on_surface_dark | ColorValue | PlatformColor("@android:color/system_on_surface_dark") |
| system_on_surface_light | ColorValue | PlatformColor("@android:color/system_on_surface_light") |
| system_on_surface_variant_dark | ColorValue | PlatformColor("@android:color/system_on_surface_variant_dark") |
| system_on_surface_variant_light | ColorValue | PlatformColor("@android:color/system_on_surface_variant_light") |
| system_on_tertiary_container_dark | ColorValue | PlatformColor("@android:color/system_on_tertiary_container_dark") |
| system_on_tertiary_container_light | ColorValue | PlatformColor("@android:color/system_on_tertiary_container_light") |
| system_on_tertiary_dark | ColorValue | PlatformColor("@android:color/system_on_tertiary_dark") |
| system_on_tertiary_fixed | ColorValue | PlatformColor("@android:color/system_on_tertiary_fixed") |
| system_on_tertiary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_tertiary_fixed_variant") |
| system_on_tertiary_light | ColorValue | PlatformColor("@android:color/system_on_tertiary_light") |
| system_outline_dark | ColorValue | PlatformColor("@android:color/system_outline_dark") |
| system_outline_light | ColorValue | PlatformColor("@android:color/system_outline_light") |
| system_outline_variant_dark | ColorValue | PlatformColor("@android:color/system_outline_variant_dark") |
| system_outline_variant_light | ColorValue | PlatformColor("@android:color/system_outline_variant_light") |
| system_palette_key_color_neutral_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_dark") |
| system_palette_key_color_neutral_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_light") |
| system_palette_key_color_neutral_variant_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_variant_dark") |
| system_palette_key_color_neutral_variant_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_variant_light") |
| system_palette_key_color_primary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_primary_dark") |
| system_palette_key_color_primary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_primary_light") |
| system_palette_key_color_secondary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_secondary_dark") |
| system_palette_key_color_secondary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_secondary_light") |
| system_palette_key_color_tertiary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_tertiary_dark") |
| system_palette_key_color_tertiary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_tertiary_light") |
| system_primary_container_dark | ColorValue | PlatformColor("@android:color/system_primary_container_dark") |
| system_primary_container_light | ColorValue | PlatformColor("@android:color/system_primary_container_light") |
| system_primary_dark | ColorValue | PlatformColor("@android:color/system_primary_dark") |
| system_primary_fixed | ColorValue | PlatformColor("@android:color/system_primary_fixed") |
| system_primary_fixed_dim | ColorValue | PlatformColor("@android:color/system_primary_fixed_dim") |
| system_primary_light | ColorValue | PlatformColor("@android:color/system_primary_light") |
| system_secondary_container_dark | ColorValue | PlatformColor("@android:color/system_secondary_container_dark") |
| system_secondary_container_light | ColorValue | PlatformColor("@android:color/system_secondary_container_light") |
| system_secondary_dark | ColorValue | PlatformColor("@android:color/system_secondary_dark") |
| system_secondary_fixed | ColorValue | PlatformColor("@android:color/system_secondary_fixed") |
| system_secondary_fixed_dim | ColorValue | PlatformColor("@android:color/system_secondary_fixed_dim") |
| system_secondary_light | ColorValue | PlatformColor("@android:color/system_secondary_light") |
| system_surface_bright_dark | ColorValue | PlatformColor("@android:color/system_surface_bright_dark") |
| system_surface_bright_light | ColorValue | PlatformColor("@android:color/system_surface_bright_light") |
| system_surface_container_dark | ColorValue | PlatformColor("@android:color/system_surface_container_dark") |
| system_surface_container_high_dark | ColorValue | PlatformColor("@android:color/system_surface_container_high_dark") |
| system_surface_container_high_light | ColorValue | PlatformColor("@android:color/system_surface_container_high_light") |
| system_surface_container_highest_dark | ColorValue | PlatformColor("@android:color/system_surface_container_highest_dark") |
| system_surface_container_highest_light | ColorValue | PlatformColor("@android:color/system_surface_container_highest_light") |
| system_surface_container_light | ColorValue | PlatformColor("@android:color/system_surface_container_light") |
| system_surface_container_low_dark | ColorValue | PlatformColor("@android:color/system_surface_container_low_dark") |
| system_surface_container_low_light | ColorValue | PlatformColor("@android:color/system_surface_container_low_light") |
| system_surface_container_lowest_dark | ColorValue | PlatformColor("@android:color/system_surface_container_lowest_dark") |
| system_surface_container_lowest_light | ColorValue | PlatformColor("@android:color/system_surface_container_lowest_light") |
| system_surface_dark | ColorValue | PlatformColor("@android:color/system_surface_dark") |
| system_surface_dim_dark | ColorValue | PlatformColor("@android:color/system_surface_dim_dark") |
| system_surface_dim_light | ColorValue | PlatformColor("@android:color/system_surface_dim_light") |
| system_surface_light | ColorValue | PlatformColor("@android:color/system_surface_light") |
| system_surface_variant_dark | ColorValue | PlatformColor("@android:color/system_surface_variant_dark") |
| system_surface_variant_light | ColorValue | PlatformColor("@android:color/system_surface_variant_light") |
| system_tertiary_container_dark | ColorValue | PlatformColor("@android:color/system_tertiary_container_dark") |
| system_tertiary_container_light | ColorValue | PlatformColor("@android:color/system_tertiary_container_light") |
| system_tertiary_dark | ColorValue | PlatformColor("@android:color/system_tertiary_dark") |
| system_tertiary_fixed | ColorValue | PlatformColor("@android:color/system_tertiary_fixed") |
| system_tertiary_fixed_dim | ColorValue | PlatformColor("@android:color/system_tertiary_fixed_dim") |
| system_tertiary_light | ColorValue | PlatformColor("@android:color/system_tertiary_light") |
| system_text_hint_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_hint_inverse_dark") |
| system_text_hint_inverse_light | ColorValue | PlatformColor("@android:color/system_text_hint_inverse_light") |
| system_text_primary_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_dark") |
| system_text_primary_inverse_disable_only_dark | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_disable_only_dark") |
| system_text_primary_inverse_disable_only_light | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_disable_only_light") |
| system_text_primary_inverse_light | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_light") |
| system_text_secondary_and_tertiary_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_dark") |
| system_text_secondary_and_tertiary_inverse_disabled_dark | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_disabled_dark") |
| system_text_secondary_and_tertiary_inverse_disabled_light | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_disabled_light") |
| system_text_secondary_and_tertiary_inverse_light | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_light") |
| Property | Type | Description |
|---|---|---|
| system_error_0 | ColorValue | PlatformColor("@android:color/system_error_0") |
| system_error_10 | ColorValue | PlatformColor("@android:color/system_error_10") |
| system_error_100 | ColorValue | PlatformColor("@android:color/system_error_100") |
| system_error_1000 | ColorValue | PlatformColor("@android:color/system_error_1000") |
| system_error_200 | ColorValue | PlatformColor("@android:color/system_error_200") |
| system_error_300 | ColorValue | PlatformColor("@android:color/system_error_300") |
| system_error_400 | ColorValue | PlatformColor("@android:color/system_error_400") |
| system_error_50 | ColorValue | PlatformColor("@android:color/system_error_50") |
| system_error_500 | ColorValue | PlatformColor("@android:color/system_error_500") |
| system_error_600 | ColorValue | PlatformColor("@android:color/system_error_600") |
| system_error_700 | ColorValue | PlatformColor("@android:color/system_error_700") |
| system_error_800 | ColorValue | PlatformColor("@android:color/system_error_800") |
| system_error_900 | ColorValue | PlatformColor("@android:color/system_error_900") |
| system_on_surface_disabled | ColorValue | PlatformColor("@android:color/system_on_surface_disabled") |
| system_outline_disabled | ColorValue | PlatformColor("@android:color/system_outline_disabled") |
| system_surface_disabled | ColorValue | PlatformColor("@android:color/system_surface_disabled") |
| Property | Type | Description |
|---|---|---|
| colorBackground | ColorValue | PlatformColor("?attr/colorBackground") |
| colorForeground | ColorValue | PlatformColor("?attr/colorForeground") |
| colorForegroundInverse | ColorValue | PlatformColor("?attr/colorForegroundInverse") |
| Property | Type | Description |
|---|---|---|
| colorActivatedHighlight | ColorValue | PlatformColor("?attr/colorActivatedHighlight") |
| colorFocusedHighlight | ColorValue | PlatformColor("?attr/colorFocusedHighlight") |
| colorLongPressedHighlight | ColorValue | PlatformColor("?attr/colorLongPressedHighlight") |
| colorMultiSelectHighlight | ColorValue | PlatformColor("?attr/colorMultiSelectHighlight") |
| colorPressedHighlight | ColorValue | PlatformColor("?attr/colorPressedHighlight") |
| Property | Type | Description |
|---|---|---|
| colorAccent | ColorValue | PlatformColor("?attr/colorAccent") |
| colorButtonNormal | ColorValue | PlatformColor("?attr/colorButtonNormal") |
| colorControlActivated | ColorValue | PlatformColor("?attr/colorControlActivated") |
| colorControlHighlight | ColorValue | PlatformColor("?attr/colorControlHighlight") |
| colorControlNormal | ColorValue | PlatformColor("?attr/colorControlNormal") |
| colorEdgeEffect | ColorValue | PlatformColor("?attr/colorEdgeEffect") |
| colorPrimary | ColorValue | PlatformColor("?attr/colorPrimary") |
| colorPrimaryDark | ColorValue | PlatformColor("?attr/colorPrimaryDark") |
| Property | Type | Description |
|---|---|---|
| colorBackgroundFloating | ColorValue | PlatformColor("?attr/colorBackgroundFloating") |
| Property | Type | Description |
|---|---|---|
| colorSecondary | ColorValue | PlatformColor("?attr/colorSecondary") |
| Property | Type | Description |
|---|---|---|
| colorError | ColorValue | PlatformColor("?attr/colorError") |
| colorMode | ColorValue | PlatformColor("?attr/colorMode") |
| Property | Type | Description |
|---|---|---|
| colorBackgroundCacheHint | ColorValue | PlatformColor("?attr/colorBackgroundCacheHint") |
| Property | Type | Description |
|---|---|---|
| primary_text_dark | ColorValue |
PlatformColor("@android:color/primary_text_dark") |
| primary_text_dark_nodisable | ColorValue |
PlatformColor("@android:color/primary_text_dark_nodisable") |
| primary_text_light | ColorValue |
PlatformColor("@android:color/primary_text_light") |
| primary_text_light_nodisable | ColorValue |
PlatformColor("@android:color/primary_text_light_nodisable") |
| secondary_text_dark | ColorValue |
PlatformColor("@android:color/secondary_text_dark") |
| secondary_text_dark_nodisable | ColorValue |
PlatformColor("@android:color/secondary_text_dark_nodisable") |
| secondary_text_light | ColorValue |
PlatformColor("@android:color/secondary_text_light") |
| secondary_text_light_nodisable | ColorValue |
PlatformColor("@android:color/secondary_text_light_nodisable") |
| tertiary_text_dark | ColorValue |
PlatformColor("@android:color/tertiary_text_dark") |
| tertiary_text_light | ColorValue |
PlatformColor("@android:color/tertiary_text_light") |
Android Dynamic Material Colors
You can find out more about color roles in official Material Design 3 documentation.
You can read about the difference between dynamic and static colors in official Material Design 3 documentation.
For a detailed definition of each color role, see material components color documentation.
| Property | Type | Description |
|---|---|---|
| background | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| error | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| errorContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onBackground | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onError | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onErrorContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurface | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurfaceInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurfaceVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| outline | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| outlineVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surface | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceBright | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerHigh | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerHighest | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerLow | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerLowest | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
Android Static Material Colors
You can find out more about color roles in official Material Design 3 documentation.
You can read about the difference between dynamic and static colors in official Material Design 3 documentation.
For a detailed definition of each color role, see material components color documentation.
| Property | Type | Description |
|---|---|---|
| background | ColorValue | |
| error | ColorValue | |
| errorContainer | ColorValue | |
| onBackground | ColorValue | |
| onError | ColorValue | |
| onErrorContainer | ColorValue | |
| onPrimary | ColorValue | |
| onPrimaryContainer | ColorValue | |
| onPrimaryFixed | ColorValue | |
| onPrimaryFixedVariant | ColorValue | |
| onSecondary | ColorValue | |
| onSecondaryContainer | ColorValue | |
| onSecondaryFixed | ColorValue | |
| onSecondaryFixedVariant | ColorValue | |
| onSurface | ColorValue | |
| onSurfaceInverse | ColorValue | |
| onSurfaceVariant | ColorValue | |
| onTertiary | ColorValue | |
| onTertiaryContainer | ColorValue | |
| onTertiaryFixed | ColorValue | |
| onTertiaryFixedVariant | ColorValue | |
| outline | ColorValue | |
| outlineVariant | ColorValue | |
| primary | ColorValue | |
| primaryContainer | ColorValue | |
| primaryFixed | ColorValue | |
| primaryFixedDim | ColorValue | |
| primaryInverse | ColorValue | |
| secondary | ColorValue | |
| secondaryContainer | ColorValue | |
| secondaryFixed | ColorValue | |
| secondaryFixedDim | ColorValue | |
| surface | ColorValue | |
| surfaceBright | ColorValue | |
| surfaceContainer | ColorValue | |
| surfaceContainerHigh | ColorValue | |
| surfaceContainerHighest | ColorValue | |
| surfaceContainerLow | ColorValue | |
| surfaceContainerLowest | ColorValue | |
| surfaceDim | ColorValue | |
| surfaceInverse | ColorValue | |
| surfaceVariant | ColorValue | |
| tertiary | ColorValue | |
| tertiaryContainer | ColorValue | |
| tertiaryFixed | ColorValue | |
| tertiaryFixedDim | ColorValue |
| Property | Type | Description |
|---|---|---|
| android | AndroidBaseColorSDK1 & AndroidBaseColorSDK14 & AndroidBaseColorSDK31 & AndroidBaseColorSDK34 & AndroidBaseColorSDK35 & AndroidDeprecatedColor & undefined & {
attr: AndroidBaseColorAttr,
dynamic: AndroidDynamicMaterialColor,
material: AndroidMaterialColor
} | - |
| ios | IOSBaseColor & undefined | - |
| Property | Type | Description |
|---|---|---|
| darkText | ColorValue | PlatformColor("darkText") |
| label | ColorValue | PlatformColor("label") |
| lightText | ColorValue | PlatformColor("lightText") |
| link | ColorValue | PlatformColor("link") |
| opaqueSeparator | ColorValue | PlatformColor("opaqueSeparator") |
| placeholderText | ColorValue | PlatformColor("placeholderText") |
| quaternaryLabel | ColorValue | PlatformColor("quaternaryLabel") |
| quaternarySystemFill | ColorValue | PlatformColor("quaternarySystemFill") |
| secondaryLabel | ColorValue | PlatformColor("secondaryLabel") |
| secondarySystemBackground | ColorValue | PlatformColor("secondarySystemBackground") |
| secondarySystemFill | ColorValue | PlatformColor("secondarySystemFill") |
| secondarySystemGroupedBackground | ColorValue | PlatformColor("secondarySystemGroupedBackground") |
| separator | ColorValue | PlatformColor("separator") |
| systemBackground | ColorValue | PlatformColor("systemBackground") |
| systemBlue | ColorValue | PlatformColor("systemBlue") |
| systemBrown | ColorValue | PlatformColor("systemBrown") |
| systemCyan | ColorValue | PlatformColor("systemCyan") |
| systemFill | ColorValue | PlatformColor("systemFill") |
| systemGray | ColorValue | PlatformColor("systemGray") |
| systemGray2 | ColorValue | PlatformColor("systemGray2") |
| systemGray3 | ColorValue | PlatformColor("systemGray3") |
| systemGray4 | ColorValue | PlatformColor("systemGray4") |
| systemGray5 | ColorValue | PlatformColor("systemGray5") |
| systemGray6 | ColorValue | PlatformColor("systemGray6") |
| systemGreen | ColorValue | PlatformColor("systemGreen") |
| systemGroupedBackground | ColorValue | PlatformColor("systemGroupedBackground") |
| systemIndigo | ColorValue | PlatformColor("systemIndigo") |
| systemMint | ColorValue | PlatformColor("systemMint") |
| systemOrange | ColorValue | PlatformColor("systemOrange") |
| systemPink | ColorValue | PlatformColor("systemPink") |
| systemPurple | ColorValue | PlatformColor("systemPurple") |
| systemRed | ColorValue | PlatformColor("systemRed") |
| systemTeal | ColorValue | PlatformColor("systemTeal") |
| systemYellow | ColorValue | PlatformColor("systemYellow") |
| tertiaryLabel | ColorValue | PlatformColor("tertiaryLabel") |
| tertiarySystemBackground | ColorValue | PlatformColor("tertiarySystemBackground") |
| tertiarySystemFill | ColorValue | PlatformColor("tertiarySystemFill") |
| tertiarySystemGroupedBackground | ColorValue | PlatformColor("tertiarySystemGroupedBackground") |
Types
Type: AndroidBaseColorSDK1 AndroidBaseColorSDK14 AndroidBaseColorSDK31 AndroidBaseColorSDK34 AndroidBaseColorSDK35 AndroidDeprecatedColor extended by:
| Property | Type | Description |
|---|
Type: AndroidColorAttrSDK1 AndroidColorAttrSDK5 AndroidColorAttrSDK14 AndroidColorAttrSDK21 AndroidColorAttrSDK23 AndroidColorAttrSDK25 AndroidColorAttrSDK26 extended by:
| Property | Type | Description |
|---|
Type: AndroidDynamicMaterialColorType extended by:
| Property | Type | Description |
|---|
Type: AndroidStaticMaterialColorType extended by:
| Property | Type | Description |
|---|