# ChipColors

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/material/ChipColors "View this page in Java")

<br />

```
class ChipColors
```

<br />

*** ** * ** ***

Represents the background and content colors used in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).

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

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#ChipColors(androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.ColorBuilders.ColorProp))`(` ` backgroundColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`,` ` contentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) `)` Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.                                                                                                                                                                                                                                                                                                                                                                                                           |
| [ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#ChipColors(int,int))`(backgroundColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, contentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [ChipColors](https://developer.android.com/reference/kotlin/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))`(` ` backgroundColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`,` ` iconColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`,` ` contentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`,` ` secondaryContentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) `)` Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object. |
| [ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#ChipColors(int,int,int,int))`(` ` backgroundColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` iconColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` contentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` secondaryContentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.             |

|                                                    ### Public functions                                                     |
|-----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | [getBackgroundColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#getBackgroundColor())`()` The background color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).                                                                                                                                                                                                                                                                                                    |
| [ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | [getContentColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#getContentColor())`()` The main text color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).                                                                                                                                                                                                                                                                                                           |
| [ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | [getIconColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#getIconColor())`()` The icon color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).                                                                                                                                                                                                                                                                                                                      |
| [ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | [getSecondaryContentColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#getSecondaryContentColor())`()` The label text color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).                                                                                                                                                                                                                                                                                        |
| `java-static `[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)    | [primaryChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#primaryChipColors(androidx.wear.protolayout.material.Colors))`(colors: `[Colors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Colors)`)` Returns a[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object, using the current Primary colors from the given[Colors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Colors).     |
| `java-static `[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)    | [secondaryChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors#secondaryChipColors(androidx.wear.protolayout.material.Colors))`(colors: `[Colors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Colors)`)` Returns a[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object, using the current Surface colors from the given[Colors](https://developer.android.com/reference/kotlin/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)  

```
ChipColors(
    backgroundColor: ColorBuilders.ColorProp,
    contentColor: ColorBuilders.ColorProp
)
```

Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.  

|                                                                   Parameters                                                                   |
|------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `backgroundColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | The background color to be used for[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).               |
| `contentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)    | The content color to be used for all items inside[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). |

### ChipColors

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

```
ChipColors(backgroundColor: @ColorInt Int, contentColor: @ColorInt Int)
```

Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.  

|                                                                                        Parameters                                                                                         |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `backgroundColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The background color to be used for[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). Should be in ARGB format.               |
| `contentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | The content color to be used for all items inside[Chip](https://developer.android.com/reference/kotlin/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)  

```
ChipColors(
    backgroundColor: ColorBuilders.ColorProp,
    iconColor: ColorBuilders.ColorProp,
    contentColor: ColorBuilders.ColorProp,
    secondaryContentColor: ColorBuilders.ColorProp
)
```

Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.  

|                                                                      Parameters                                                                      |
|------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `backgroundColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)       | The background color to be used for[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).           |
| `iconColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)             | The color to be used for an icon in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).           |
| `contentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)          | The text color to be used for a main text in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).  |
| `secondaryContentColor: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | The text color to be used for a label text in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). |

### ChipColors

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

```
ChipColors(
    backgroundColor: @ColorInt Int,
    iconColor: @ColorInt Int,
    contentColor: @ColorInt Int,
    secondaryContentColor: @ColorInt Int
)
```

Constructor for the[ChipColors](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/ChipColors)object.  

|                                                                                           Parameters                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `backgroundColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)       | The background color to be used for[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). Should be in ARGB format.           |
| `iconColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)             | The color to be used for an icon in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). Should be in ARGB format.           |
| `contentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | The text color to be used for a main text in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). Should be in ARGB format.  |
| `secondaryContentColor: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The text color to be used for a label text in[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip). Should be in ARGB format. |

## Public functions

### getBackgroundColor

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

```
fun getBackgroundColor(): ColorBuilders.ColorProp
```

The background color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).  

### getContentColor

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

```
fun getContentColor(): ColorBuilders.ColorProp
```

The main text color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).  

### getIconColor

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

```
fun getIconColor(): ColorBuilders.ColorProp
```

The icon color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).  

### getSecondaryContentColor

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

```
fun getSecondaryContentColor(): ColorBuilders.ColorProp
```

The label text color to be used on[Chip](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/material/Chip).  

### primaryChipColors

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

```
java-static fun primaryChipColors(colors: Colors): ChipColors
```

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

### secondaryChipColors

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

```
java-static fun secondaryChipColors(colors: Colors): ChipColors
```

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