# UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder

Artifact: [androidx.wear.watchface:watchface-style](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/style/UserStyleSetting.kt+class:androidx.wear.watchface.style.UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder) Added in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
class UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

A Builder for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,kotlin.collections.List))( id: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id, resources: https://developer.android.com/reference/android/content/res/Resources.html, displayNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, screenReaderNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, colors: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html> )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption` | `[build](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#build())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( watchFaceEditorData: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### Builder

Added in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
[Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#Builder(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,kotlin.collections.List))(
    id: UserStyleSetting.Option.Id,
    resources: Resources,
    displayNameResourceId: @StringRes Int,
    screenReaderNameResourceId: @StringRes Int,
    colors: @ColorInt List<Int>
)
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Constructs a builder for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`.

| Parameters |
|---|---|
| `id: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.Option.Id` for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, must be unique within the parent `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`. |
| `resources: https://developer.android.com/reference/android/content/res/Resources.html` | The `https://developer.android.com/reference/android/content/res/Resources.html` from which `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,kotlin.collections.List)` and `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#(androidx.wear.watchface.style.UserStyleSetting.Option.Id,android.content.res.Resources,kotlin.Int,kotlin.Int,kotlin.collections.List)` are loaded. |
| `displayNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | String resource id for a human readable name for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, used in the userStyle selection UI. |
| `screenReaderNameResourceId: @https://developer.android.com/reference/kotlin/androidx/annotation/StringRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | String resource id for a human readable name for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, used by screen readers. This should be more descriptive than `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#displayName()`. |
| `colors: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | : Array The colors for this option. The colors should be listed in order of decreasing importance. The number of provided colors must be the same for all `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`s in the list. The number of colors specified is up to the user, but 1 or 3 are comon choices. |

## Public functions

### build

Added in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
fun [build](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#build())(): UserStyleSetting.ColorUserStyleSetting.ColorOption
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Constructs the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`.

### setWatchFaceEditorData

Added in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

```
fun [setWatchFaceEditorData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))(
    watchFaceEditorData: UserStyleSetting.WatchFaceEditorData
): UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Sets optional data for an on watch face editor, this will not be sent to the companion and its contents may be used in preference to other fields by an on watch face editor.