createThemedRemoteColor
Source set: Android
public fun RemoteColor.Companion.createThemedRemoteColor(
@ColorRes lightColorRes: Int,
@ColorRes darkColorRes: Int,
@ColorInt lightFallback: Int,
@ColorInt darkFallback: Int,
): RemoteColor
Creates a themed RemoteColor that resolves to different Android system colors in light and dark mode.
Parameters
| lightColorRes | The android.R.color resource ID for light mode. |
| darkColorRes | The android.R.color resource ID for dark mode. |
| lightFallback | The fallback ARGB color integer to use in light mode if the theme color cannot be resolved. |
| darkFallback | The fallback ARGB color integer to use in dark mode if the theme color cannot be resolved. |
Return
A RemoteColor representing the themed color.
createThemedRemoteColor
Source set: Android
public fun RemoteColor.Companion.createThemedRemoteColor(
@ColorRes lightColorRes: Int,
@ColorRes darkColorRes: Int,
lightFallback: Color,
darkFallback: Color,
): RemoteColor
Creates a themed RemoteColor that resolves to different Android system colors in light and dark mode.
Parameters
| lightColorRes | The android.R.color resource ID for light mode. |
| darkColorRes | The android.R.color resource ID for dark mode. |
| lightFallback | The fallback Color value to use in light mode if the theme color cannot be resolved. |
| darkFallback | The fallback Color value to use in dark mode if the theme color cannot be resolved. |
Return
A RemoteColor representing the themed color.