Source set: Common
class Colors(
primary: Color,
primaryVariant: Color,
secondary: Color,
secondaryVariant: Color,
background: Color,
surface: Color,
error: Color,
onPrimary: Color,
onSecondary: Color,
onBackground: Color,
onSurface: Color,
onError: Color,
isLight: Boolean,
)
The Material Design color system can help you create a color theme that reflects your brand or style.

To create a light set of colors using the baseline values, use lightColors To create a dark set of colors using the baseline values, use darkColors
- Floating action buttons
- Selection controls, like checkboxes and radio buttons
- Highlighting selected text
- Links and headlines
Properties
primary
Source set: Common
var primary
primaryVariant
Source set: Common
var primaryVariant
secondary
Source set: Common
var secondary
secondaryVariant
Source set: Common
var secondaryVariant
background
Source set: Common
var background
surface
Source set: Common
var surface
error
Source set: Common
var error
onPrimary
Source set: Common
var onPrimary
onSecondary
Source set: Common
var onSecondary
onBackground
Source set: Common
var onBackground
onSurface
Source set: Common
var onSurface
onError
Source set: Common
var onError
isLight
Source set: Common
var isLight
Functions
copy
fun copy(
primary: Color = this.primary,
primaryVariant: Color = this.primaryVariant,
secondary: Color = this.secondary,
secondaryVariant: Color = this.secondaryVariant,
background: Color = this.background,
surface: Color = this.surface,
error: Color = this.error,
onPrimary: Color = this.onPrimary,
onSecondary: Color = this.onSecondary,
onBackground: Color = this.onBackground,
onSurface: Color = this.onSurface,
onError: Color = this.onError,
isLight: Boolean = this.isLight,
): Colors
Returns a copy of this Colors, optionally overriding some of the values.