# Colors

Artifact: [androidx.xr.glimmer:glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer) [View Source](https://cs.android.com/search?q=file:androidx/xr/glimmer/Colors.kt+class:androidx.xr.glimmer.Colors) Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)


```
class Colors
```

<br />

*** ** * ** ***

A set of named color parameters for a `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/GlimmerTheme`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#Colors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( primary: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, secondary: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, positive: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, negative: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, surface: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( primary: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, secondary: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, positive: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, negative: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, background: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, surface: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` Returns a copy of this Colors, optionally overriding some of the values. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#background()` The background color that appears behind components. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#negative()` The negative color is used to indicate negative actions. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#positive()` The positive color is used to indicate positive or affirmative actions. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#primary()` The primary color is an accent color used for brand expression. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#secondary()` The secondary color is an accent color used for brand expression. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/xr/glimmer/Colors#surface()` The surface color that's applied to surfaces of components, such as buttons, cards, and list items. |

## Public constructors

### Colors

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
Colors(
    primary: Color = Color(0xFF9BBFFF),
    secondary: Color = Color(0xFF4C88E9),
    positive: Color = Color(0xFF63FEA8),
    negative: Color = Color(0xFFFFA7A0),
    background: Color = Color.Black,
    surface: Color = Color(0xFF303030)
)
```

## Public functions

### copy

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/xr-glimmer#1.0.0-alpha22)

```
fun copy(
    primary: Color = this.primary,
    secondary: Color = this.secondary,
    positive: Color = this.positive,
    negative: Color = this.negative,
    background: Color = this.background,
    surface: Color = this.surface
): Colors
```

Returns a copy of this Colors, optionally overriding some of the values.

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### background

```
val background: Color
```

The background color that appears behind components. This should be `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Black()` to ensure maximum contrast.

### negative

```
val negative: Color
```

The negative color is used to indicate negative actions. For example, the border of a cancel button. It should not be used to fill surfaces.

### positive

```
val positive: Color
```

The positive color is used to indicate positive or affirmative actions. For example, the border of a confirmation button. It should not be used to fill surfaces.

### primary

```
val primary: Color
```

The primary color is an accent color used for brand expression. It should typically be used with text and icons for emphasis, or with borders to accentuate a particular component - it should not be used to fill surfaces.

### secondary

```
val secondary: Color
```

The secondary color is an accent color used for brand expression. It should typically be used with text and icons for emphasis, or with borders to accentuate a particular component - it should not be used to fill surfaces.

### surface

```
val surface: Color
```

The surface color that's applied to surfaces of components, such as buttons, cards, and list items.