---
title: "background"
description: "Specified a solid background for a curved element."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun CurvedModifier.background(
    color: Color,
    cap: StrokeCap = StrokeCap.Butt,
): CurvedModifier
```


Specified a solid background for a curved element.

#### Parameters

| | |
| --- | --- |
| color | The color to use to paint the background. |
| cap | How to start and end the background. |




