ColorRoles

public final class ColorRoles
extends Object

java.lang.Object
   ↳ com.google.android.material.color.ColorRoles


Each accent color (primary, secondary and tertiary), is provided as a group of four supplementary color roles with different luminance which can be used in the UI to define emphasis and to provide a greater flexibility in expression.

Summary

Public methods

int getAccent()

Returns the accent color, used as the main color from the color role.

int getAccentContainer()

Returns the accent_container color, used with less emphasis than the accent color.

int getOnAccent()

Returns the on_accent color, used for content such as icons and text on top of the Accent color.

int getOnAccentContainer()

Returns the on_accent_container color, used for content such as icons and text on top of the accent_container color.

Inherited methods

Public methods

getAccent

public int getAccent ()

Returns the accent color, used as the main color from the color role.

Returns
int

getAccentContainer

public int getAccentContainer ()

Returns the accent_container color, used with less emphasis than the accent color.

Returns
int

getOnAccent

public int getOnAccent ()

Returns the on_accent color, used for content such as icons and text on top of the Accent color.

Returns
int

getOnAccentContainer

public int getOnAccentContainer ()

Returns the on_accent_container color, used for content such as icons and text on top of the accent_container color.

Returns
int