# ColorBuilders.ColorStop.Builder

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ColorBuilders.java+class:androidx.wear.protolayout.ColorBuilders.ColorStop.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

*** ** * ** ***


```
public final class ColorBuilders.ColorStop.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop`

## Summary

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 300) https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder#Builder(androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.TypeBuilders.FloatProp)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp color, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp offset )` Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop` | `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder#build()()` Builds an instance from accumulated values. |

## Public constructors

### Builder

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

```
@RequiresSchemaVersion(major = 1, minor = 300)
public Builder(
    @NonNull ColorBuilders.ColorProp color,
    @NonNull TypeBuilders.FloatProp offset
)
```

Creates an instance of `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp color` | the color for this stop. Only opaque colors are supported. Any transparent colors will have their alpha component set to 0xFF (opaque). |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TypeBuilders.FloatProp offset` | the relative offset for this color, between 0 and 1. This determines where the color is positioned relative to a gradient space. |

## Public methods

### build

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

```
public @NonNull ColorBuilders.ColorStop build()
```

Builds an instance from accumulated values.