# DynamicColorsOptions

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

*** ** * ** ***


```
public class DynamicColorsOptions
```

<br />

*** ** * ** ***

Wrapper class for specifying dynamic colors options when applying dynamic colors. Clients have the options to provide a custom theme overlay, set the precondition that decides if dynamic colors should be applied, set the callback method and/or set the color source image to apply content-based dynamic colors.

## Summary

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

| ### Public fields |
|---|---|
| `https://developer.android.com/reference/java/lang/Integer` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#contentBasedSeedColor()` |
| `final https://developer.android.com/reference/com/google/android/material/color/DynamicColors.OnAppliedCallback` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#onAppliedCallback()` |
| `final https://developer.android.com/reference/com/google/android/material/color/DynamicColors.Precondition` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#precondition()` |
| `final int` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#themeOverlay()` |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/java/lang/Integer` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#getContentBasedSeedColor()()` Returns the seed color extracted from the color source image. |
| `https://developer.android.com/reference/com/google/android/material/color/DynamicColors.OnAppliedCallback` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#getOnAppliedCallback()()` Returns the callback method after dynamic colors have been applied. |
| `https://developer.android.com/reference/com/google/android/material/color/DynamicColors.Precondition` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#getPrecondition()()` Returns the precondition that decides if dynamic colors should be applied. |
| `int` | `https://developer.android.com/reference/com/google/android/material/color/DynamicColorsOptions#getThemeOverlay()()` Returns the resource ID of the theme overlay that provides dynamic color definition. |

## Public fields

### contentBasedSeedColor

```
public Integer contentBasedSeedColor
```

### onAppliedCallback

```
public final DynamicColors.OnAppliedCallback onAppliedCallback
```

### precondition

```
public final DynamicColors.Precondition precondition
```

### themeOverlay

```
public final int themeOverlay
```

## Public methods

### getContentBasedSeedColor

```
public Integer getContentBasedSeedColor()
```

Returns the seed color extracted from the color source image.

### getOnAppliedCallback

```
public DynamicColors.OnAppliedCallback getOnAppliedCallback()
```

Returns the callback method after dynamic colors have been applied.

### getPrecondition

```
public DynamicColors.Precondition getPrecondition()
```

Returns the precondition that decides if dynamic colors should be applied.

### getThemeOverlay

```
public int getThemeOverlay()
```

Returns the resource ID of the theme overlay that provides dynamic color definition.