<h2 id="lineargradient-colors-start-end-tilemode">linearGradient</h2>

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

```kotlin
public fun RemoteBrush.Companion.linearGradient(
    colors: List<RemoteColor>,
    start: RemoteOffset? = null,
    end: RemoteOffset? = null,
    tileMode: ComposeTileMode = ComposeTileMode.Clamp,
): RemoteBrush
```

Creates a linear gradient with the provided colors along the given start and end coordinates.

```
 Brush.linearGradient(    listOf(Color.Red.rc, Color.Blue.rc),    start = Offset(0.rf, 50.rf)    end = Offset(0.rf, 100.rf)
)
```

#### Parameters

| | |
| --- | --- |
| colors | Colors to be rendered as part of the gradient |
| start | Starting position of the linear gradient. This can be set to `RemoteOffset.Zero` to position at the far left and top of the drawing area |
| end | Ending position of the linear gradient. This can be set to [RemoteOffset](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteOffset) Infinite to position at the far right and bottom of the 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 |