Colors
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 |
|
|---|---|
const Colors |
The default color scheme to be used in ProtoLayout Material components. |
Public constructors |
|---|
Colors(Constructor for |
Public functions |
|
|---|---|
@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
Colors(
primary: @ColorInt Int,
onPrimary: @ColorInt Int,
surface: @ColorInt Int,
onSurface: @ColorInt Int
)
Constructor for Colors object.
| Parameters | |
|---|---|
primary: @ColorInt Int |
The background color to be used for primary components. Should be in ARGB format. |
onPrimary: @ColorInt Int |
The content color or tint color to be used for primary components. Should be in ARGB format. |
surface: @ColorInt Int |
The background color to be used for secondary components. Should be in ARGB format. |
onSurface: @ColorInt Int |
The content color or tint color to be used for secondary components. Should be in ARGB format. |
Public functions
getOnPrimary
fun getOnPrimary(): @ColorInt Int
The onPrimary color to be used on components.
getOnSurface
fun getOnSurface(): @ColorInt Int
The onSurface color to be used on components.
getPrimary
fun getPrimary(): @ColorInt Int
The primary color to be used on components.
getSurface
fun getSurface(): @ColorInt Int
The surface color to be used on components.