Colors
public class Colors
Represent the container for default color scheme in your Tile, that can be used to create color objects for all Material components.
See DEFAULT for default color scheme.
Summary
Constants |
|
|---|---|
static final @NonNull Colors |
The default color scheme to be used in ProtoLayout Material components. |
Public constructors |
|---|
Colors(Constructor for |
Public methods |
|
|---|---|
@ColorInt int |
The onPrimary color to be used on components. |
@ColorInt int |
The onSurface color to be used on components. |
@ColorInt int |
The primary color to be used on components. |
@ColorInt int |
The surface color to be used on components. |
Constants
Public constructors
Colors
public Colors(
@ColorInt int primary,
@ColorInt int onPrimary,
@ColorInt int surface,
@ColorInt int onSurface
)
Constructor for Colors object.
| Parameters | |
|---|---|
@ColorInt int primary |
The background color to be used for primary components. Should be in ARGB format. |
@ColorInt int onPrimary |
The content color or tint color to be used for primary components. Should be in ARGB format. |
@ColorInt int surface |
The background color to be used for secondary components. Should be in ARGB format. |
@ColorInt int onSurface |
The content color or tint color to be used for secondary components. Should be in ARGB format. |
Public methods
getOnPrimary
public @ColorInt int getOnPrimary()
The onPrimary color to be used on components.
getOnSurface
public @ColorInt int getOnSurface()
The onSurface color to be used on components.
getPrimary
public @ColorInt int getPrimary()
The primary color to be used on components.
getSurface
public @ColorInt int getSurface()
The surface color to be used on components.