---
title: "Fill"
description: "Specifies visual fill for styling."
type: "class"
lastmod: "2026-09-24"
---
## API Reference

> Source set: Common

```kotlin
public sealed class Fill : Interpolatable
```

Specifies visual fill for styling.

A [Fill](/jetpack-compose/androidx.compose.foundation/foundation/functions/Fill/api) is a value that describes how a region should be filled. "background" or "border color"
properties are good candidates for a property of type [Fill](/jetpack-compose/androidx.compose.foundation/foundation/functions/Fill/api).

## Functions

### asColor

> Source set: Common

```kotlin
public abstract fun asColor(): GraphicsColor
```

Return the color of this [Fill](/jetpack-compose/androidx.compose.foundation/foundation/functions/Fill/api) if it is a [Fill.Color](/jetpack-compose/androidx.compose.foundation/foundation/classes/Fill.Color/api) or
`Color.Unspecified` if [Fill.None](/jetpack-compose/androidx.compose.foundation/foundation/classes/Fill.None/api) or
[Fill.Brush](/jetpack-compose/androidx.compose.foundation/foundation/classes/Fill.Brush/api).

### asBrush

> Source set: Common

```kotlin
public abstract fun asBrush(): GraphicsBrush?
```

Return a brush if the [Fill](/jetpack-compose/androidx.compose.foundation/foundation/functions/Fill/api) is a [Fill.Brush](/jetpack-compose/androidx.compose.foundation/foundation/classes/Fill.Brush/api), otherwise `null`.

### lerp

> Source set: Common

```kotlin
override fun lerp(other: Any?, t: Float): Any?
```

## Members

### Color

> Source set: Common

```kotlin
public class Color(public val color: GraphicsColor) : Fill()
```

Fills with a solid `GraphicsColor`.

## Properties

### isColor

> Source set: Common

```kotlin
override val isColor: Boolean
```

### lerpTarget

> Source set: Common

```kotlin
override val lerpTarget: Any
```

## Functions

### asColor

> Source set: Common

```kotlin
override fun asColor(): GraphicsColor
```

### asBrush

> Source set: Common

```kotlin
override fun asBrush(): GraphicsBrush
```

### equals

> Source set: Common

```kotlin
override fun equals(other: Any?): Boolean
```

### hashCode

> Source set: Common

```kotlin
override fun hashCode(): Int
```

### toString

> Source set: Common

```kotlin
override fun toString(): String
```

### Brush

> Source set: Common

```kotlin
public class Brush(public val brush: GraphicsBrush) : Fill()
```

Fills with a `GraphicsBrush`.

## Properties

### lerpTarget

> Source set: Common

```kotlin
override val lerpTarget: Any
```

## Functions

### asColor

> Source set: Common

```kotlin
override fun asColor(): GraphicsColor
```

### asBrush

> Source set: Common

```kotlin
override fun asBrush(): GraphicsBrush
```

### equals

> Source set: Common

```kotlin
override fun equals(other: Any?): Boolean
```

### hashCode

> Source set: Common

```kotlin
override fun hashCode(): Int
```

### toString

> Source set: Common

```kotlin
override fun toString(): String
```

### None

> Source set: Common

```kotlin
public class None internal constructor() : Fill()
```

Represents an empty fill with no visual representation.

## Properties

### isColor

> Source set: Common

```kotlin
override val isColor: Boolean
```

### lerpTarget

> Source set: Common

```kotlin
override val lerpTarget: Any
```

## Functions

### asColor

> Source set: Common

```kotlin
override fun asColor(): GraphicsColor
```

### asBrush

> Source set: Common

```kotlin
override fun asBrush(): GraphicsBrush?
```

### Companion

> Source set: Common

```kotlin
public companion object
```

## Properties

### None

> Source set: Common

```kotlin
public val None: Fill = None()
```

Singleton instance representing no fill.
