# androidx.ink.brush.compose

## Extension functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.https://developer.android.com/reference/kotlin/androidx/ink/brush/compose/package-summary#(androidx.ink.brush.Brush).copyWithComposeColor(androidx.compose.ui.graphics.Color,androidx.ink.brush.BrushFamily,kotlin.Float,kotlin.Float)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, family: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, epsilon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Creates a copy of `this` `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` and allows named properties to be altered while keeping the rest unchanged. |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.Companion.https://developer.android.com/reference/kotlin/androidx/ink/brush/compose/package-summary#(androidx.ink.brush.Brush.Companion).createWithComposeColor(androidx.ink.brush.BrushFamily,androidx.compose.ui.graphics.Color,kotlin.Float,kotlin.Float)( family: https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, epsilon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Returns a new `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` with the color specified by an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3. |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.Builder` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.Builder.https://developer.android.com/reference/kotlin/androidx/ink/brush/compose/package-summary#(androidx.ink.brush.Brush.Builder).setComposeColor(androidx.compose.ui.graphics.Color)(color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Set the color on a `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.Builder` as an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3. |

## Extension properties summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.https://developer.android.com/reference/kotlin/androidx/ink/brush/compose/package-summary#(androidx.ink.brush.Brush).composeColor()` The brush color as an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value, which can express colors in several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3. |

## Extension functions

### Brush.copyWithComposeColor

Artifact: [androidx.ink:ink-brush-compose](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/compose/BrushExtensions.android.kt+function:copyWithComposeColor)

```
fun Brush.copyWithComposeColor(
    color: Color,
    family: BrushFamily = this.family,
    size: Float = this.size,
    epsilon: Float = this.epsilon
): Brush
```

Creates a copy of `this` `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` and allows named properties to be altered while keeping the rest unchanged. The color is specified as an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

### Brush.Companion.createWithComposeColor

Artifact: [androidx.ink:ink-brush-compose](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/compose/BrushExtensions.android.kt+function:createWithComposeColor)

```
fun Brush.Companion.createWithComposeColor(
    family: BrushFamily,
    color: Color,
    size: Float,
    epsilon: Float
): Brush
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush` with the color specified by an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value, which can encode several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

### Brush.Builder.setComposeColor

Artifact: [androidx.ink:ink-brush-compose](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/compose/BrushExtensions.android.kt+function:setComposeColor)

```
fun Brush.Builder.setComposeColor(color: Color): Brush.Builder
```

Set the color on a `https://developer.android.com/reference/kotlin/androidx/ink/brush/Brush.Builder` as an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.

## Extension properties

### Brush.composeColor

Artifact: [androidx.ink:ink-brush-compose](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/compose/BrushExtensions.android.kt+symbol:composeColor)

```
val Brush.composeColor: Color
```

The brush color as an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value, which can express colors in several different color spaces. sRGB and Display P3 are supported; a color in any other color space will be converted to Display P3.