# ColorBuilders.ColorStop.Builder

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder "View this page in Java")

<br />

```
class ColorBuilders.ColorStop.Builder
```

<br />

*** ** * ** ***

Builder for[ColorStop](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop)

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                 ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` [Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder#Builder(androidx.wear.protolayout.ColorBuilders.ColorProp,androidx.wear.protolayout.TypeBuilders.FloatProp))`(color: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`, offset: `[TypeBuilders.FloatProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TypeBuilders.FloatProp)`)` Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder). |

|                                                    ### Public functions                                                     |
|-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ColorBuilders.ColorStop](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop) | [build](https://developer.android.com/reference/kotlin/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)
Builder(color: ColorBuilders.ColorProp, offset: TypeBuilders.FloatProp)
```

Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder).  

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

## Public functions

### build

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

```
fun build(): ColorBuilders.ColorStop
```

Builds an instance from accumulated values.