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

```
public final 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/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`.

## Summary

| ### Public constructors |
|---|
| `[Builder](https://developer.android.com/reference/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))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources, @https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId, @https://developer.android.com/reference/androidx/annotation/StringRes int screenReaderNameResourceId, @https://developer.android.com/reference/androidx/annotation/ColorInt @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> colors )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption` | `[build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#build())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder` | `[setWatchFaceEditorData](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#setWatchFaceEditorData(androidx.wear.watchface.style.UserStyleSetting.WatchFaceEditorData))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.WatchFaceEditorData watchFaceEditorData )` **This method 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)

```
public [Builder](https://developer.android.com/reference/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))(
    @NonNull UserStyleSetting.Option.Id id,
    @NonNull Resources resources,
    @StringRes int displayNameResourceId,
    @StringRes int screenReaderNameResourceId,
    @ColorInt @NonNull List<@NonNull Integer> colors
)
```

> [!CAUTION]
> **This method 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/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id id` | `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.Option.Id` for the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, must be unique within the parent `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ListUserStyleSetting`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources` | The `https://developer.android.com/reference/android/content/res/Resources.html` from which `https://developer.android.com/reference/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/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. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int displayNameResourceId` | String resource id for a human readable name for the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, used in the userStyle selection UI. |
| `@https://developer.android.com/reference/androidx/annotation/StringRes int screenReaderNameResourceId` | String resource id for a human readable name for the `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption`, used by screen readers. This should be more descriptive than `https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#displayName()`. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> colors` | : 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/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 methods

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

```
public final @NonNull UserStyleSetting.ColorUserStyleSetting.ColorOption [build](https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ColorUserStyleSetting.ColorOption.Builder#build())()
```

> [!CAUTION]
> **This method 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/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)

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

> [!CAUTION]
> **This method 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.