# ChipColors

Artifact: [androidx.wear.protolayout:protolayout-material](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/material/ChipColors.java+class:androidx.wear.protolayout.material.ChipColors) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public class ChipColors
```

<br />

*** ** * ** ***

Represents the background and content colors used in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

See `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipDefaults#PRIMARY_COLORS()` for the default colors used in a primary styled `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. See `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipDefaults#SECONDARY_COLORS()` for the default colors used in a secondary styled `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#ChipColors(androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.ColorBuilders.ColorProp)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp backgroundColor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp contentColor )` Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object. |
| `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#ChipColors(int,int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int backgroundColor, @https://developer.android.com/reference/androidx/annotation/ColorInt int contentColor)` Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object. |
| `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#ChipColors(androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.ColorBuilders.ColorProp)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp backgroundColor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp iconColor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp contentColor, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp secondaryContentColor )` Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object. |
| `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#ChipColors(int,int,int,int)( @https://developer.android.com/reference/androidx/annotation/ColorInt int backgroundColor, @https://developer.android.com/reference/androidx/annotation/ColorInt int iconColor, @https://developer.android.com/reference/androidx/annotation/ColorInt int contentColor, @https://developer.android.com/reference/androidx/annotation/ColorInt int secondaryContentColor )` Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#getBackgroundColor()()` The background color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#getContentColor()()` The main text color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#getIconColor()()` The icon color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#getSecondaryContentColor()()` The label text color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#primaryChipColors(androidx.wear.protolayout.material.Colors)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/Colors colors)` Returns a `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object, using the current Primary colors from the given `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors`. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` | `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors#secondaryChipColors(androidx.wear.protolayout.material.Colors)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/material/Colors colors)` Returns a `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object, using the current Surface colors from the given `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors`. |

## Public constructors

### ChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp contentColor
)
```

Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp backgroundColor` | The background color to be used for `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp contentColor` | The content color to be used for all items inside `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |

### ChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public ChipColors(@ColorInt int backgroundColor, @ColorInt int contentColor)
```

Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int backgroundColor` | The background color to be used for `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int contentColor` | The content color to be used for all items inside `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |

### ChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public ChipColors(
    @NonNull ColorBuilders.ColorProp backgroundColor,
    @NonNull ColorBuilders.ColorProp iconColor,
    @NonNull ColorBuilders.ColorProp contentColor,
    @NonNull ColorBuilders.ColorProp secondaryContentColor
)
```

Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp backgroundColor` | The background color to be used for `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp iconColor` | The color to be used for an icon in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp contentColor` | The text color to be used for a main text in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp secondaryContentColor` | The text color to be used for a label text in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. |

### ChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public ChipColors(
    @ColorInt int backgroundColor,
    @ColorInt int iconColor,
    @ColorInt int contentColor,
    @ColorInt int secondaryContentColor
)
```

Constructor for the `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int backgroundColor` | The background color to be used for `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int iconColor` | The color to be used for an icon in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int contentColor` | The text color to be used for a main text in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int secondaryContentColor` | The text color to be used for a label text in `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`. Should be in ARGB format. |

## Public methods

### getBackgroundColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull ColorBuilders.ColorProp getBackgroundColor()
```

The background color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

### getContentColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull ColorBuilders.ColorProp getContentColor()
```

The main text color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

### getIconColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull ColorBuilders.ColorProp getIconColor()
```

The icon color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

### getSecondaryContentColor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull ColorBuilders.ColorProp getSecondaryContentColor()
```

The label text color to be used on `https://developer.android.com/reference/androidx/wear/protolayout/material/Chip`.

### primaryChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static @NonNull ChipColors primaryChipColors(@NonNull Colors colors)
```

Returns a `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object, using the current Primary colors from the given `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors`.

### secondaryChipColors

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public static @NonNull ChipColors secondaryChipColors(@NonNull Colors colors)
```

Returns a `https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors` object, using the current Surface colors from the given `https://developer.android.com/reference/androidx/wear/protolayout/material/Colors`.