---
title: "Colors"
description: "[Material Design color system](https://material.io/design/color/the-color-system.html)

The Material Design color system can help you create a color theme that reflects your brand or
style.

![Color
image](https://developer.android.com/images/reference/androidx/compose/material/color.png)

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"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
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,
)
```


`Material Design color system`(https://material.io/design/color/the-color-system.html)

The Material Design color system can help you create a color theme that reflects your brand or
style.

!`Color
image`(https://developer.android.com/images/reference/androidx/compose/material/color.png)

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

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var primary
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var primaryVariant
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var secondary
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var secondaryVariant
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var background
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var surface
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var error
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var onPrimary
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var onSecondary
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var onBackground
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var onSurface
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var onError
```


<div class='sourceset sourceset-common'>Common</div>


```kotlin
var isLight
```


## Functions

```kotlin
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.



