# HarmonizedColorsOptions

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/color/HarmonizedColorsOptions.java)

*** ** * ** ***


```
public class HarmonizedColorsOptions
```

<br />

*** ** * ** ***

Wrapper class for specifying harmonization options, whether to harmonize an array of color resources, or a `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes`, along with the color attribute provided to harmonize with.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder` Builder class for specifying options when harmonizing colors. |

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#colorAttributeToHarmonizeWith()` |
| `final https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#colorAttributes()` |
| `final int[]` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#colorResourceIds()` |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#createMaterialDefaults()()` Create HarmonizedColorsOptions with Material default, with Error colors being harmonized with Primary. |
| `int` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorAttributeToHarmonizeWith()()` Returns the color attribute to harmonize color resources and `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` with. |
| `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorAttributes()()` Returns the `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` that needs to be harmonized. |
| `int[]` | `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorResourceIds()()` Returns the array of color resource ids that needs to be harmonized. |

## Public fields

### colorAttributeToHarmonizeWith

```
public final int colorAttributeToHarmonizeWith
```

### colorAttributes

```
public final HarmonizedColorAttributes colorAttributes
```

### colorResourceIds

```
public final int[] colorResourceIds
```

## Public methods

### createMaterialDefaults

```
public static HarmonizedColorsOptions createMaterialDefaults()
```

Create HarmonizedColorsOptions with Material default, with Error colors being harmonized with Primary.

### getColorAttributeToHarmonizeWith

```
public int getColorAttributeToHarmonizeWith()
```

Returns the color attribute to harmonize color resources and `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` with.

### getColorAttributes

```
public HarmonizedColorAttributes getColorAttributes()
```

Returns the `https://developer.android.com/reference/com/google/android/material/color/HarmonizedColorAttributes` that needs to be harmonized.

### getColorResourceIds

```
public int[] getColorResourceIds()
```

Returns the array of color resource ids that needs to be harmonized.