<h2 id="verticalgradient-colors-starty-endy-tilemode">verticalGradient</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun RemoteBrush.Companion.verticalGradient(
    colors: List<RemoteColor>,
    startY: RemoteFloat? = null,
    endY: RemoteFloat? = null,
    tileMode: ComposeTileMode = ComposeTileMode.Clamp,
): RemoteBrush
```

Creates a vertical gradient with the given colors evenly dispersed within the gradient Ex:
```
 Brush.verticalGradient(    listOf(Color.Red.rc, Color.Green.rc, Color.Blue.rc),    startY = 0.rf,    endY = 100.rf
)
```

#### Parameters

| | |
| --- | --- |
| colors | colors to be rendered as part of the gradient |
| startY | Starting y position of the vertical gradient. Defaults to 0 which represents the top of the drawing area |
| endY | Ending y position of the vertical gradient. Defaults to `Float.POSITIVE_INFINITY` which indicates the bottom of the specified drawing area |
| tileMode | Determines the behavior for how the shader is to fill a region outside its bounds. Defaults to [ComposeTileMode.Clamp](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/clamp) to repeat the edge pixels |