getColorRoles

open fun getColorRoles(@NonNull context: Context, @ColorInt color: Int): ColorRoles

Returns the ColorRoles object generated from the provided input color.

Parameters

context

The target context.

color

The input color provided for generating its associated four color roles.


open fun getColorRoles(@ColorInt color: Int, isLightTheme: Boolean): ColorRoles

Returns the ColorRoles object generated from the provided input color.

Parameters

color

The input color provided for generating its associated four color roles.

isLightTheme

Whether the input is light themed or not, true if light theme is enabled.