theme

fun theme(@ColorInt actionLight: Int? = null, @ColorInt actionDark: Int? = null, @ColorInt titleLight: Int? = null, @ColorInt titleDark: Int? = null)

Sets colors used throughout the SDK. If no color is provided the default Parakey colors will be used.

The SDK follows the system configuration for dark mode. If the app doesn't support dark mode it is recommended to force light mode by using AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) to keep the UI consistent.

Example

Parakey.theme(
actionLight = Color.CYAN,
titleLight = Color.MAGENTA,
)

test


Note: Can't be called before initialize.


Note: Make sure that there is enough contrast in both light and dark mode. Consider that green and red shades are used for success and failure states by the SDK.

Parameters

actionLight

primary color in light mode used to highlight interactive components

actionDark

primary color in dark mode used to highlight interactive components

titleLight

used for headings in light mode

titleDark

used for headings in dark mode