# BrushPaint.ColorFunction.ReplaceColor

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/BrushPaint.kt+class:androidx.ink.brush.BrushPaint.ColorFunction.ReplaceColor) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS
- Cmn

  ```
  class BrushPaint.ColorFunction.ReplaceColor : BrushPaint.ColorFunction
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.ink.brush.BrushPaint.ColorFunction](https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction) ||
|   | ↳ | [androidx.ink.brush.BrushPaint.ColorFunction.ReplaceColor](https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor) |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction` that ignores the input color and replaces it with the specified color.

## Summary

| ### Public companion functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#withColorIntArgb(kotlin.Int)(colorIntArgb: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a color function that will replace its input color with the given color. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#withColorLong(kotlin.Long)(colorLong: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorLong https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns a color function that will replace its input color with the given color. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#colorIntArgb()` The color that will replace the input color, as a `@ColorInt`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#colorLong()` The color that will replace the input color, as a `@ColorLong`. | Cmn |

### Inherited functions

From [androidx.ink.brush.BrushPaint.ColorFunction](https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction) `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction#calculateMinimumRequiredVersion()()`

Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction`.
Cmn `@https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushPaint.ColorFunction#transformColorIntArgb(kotlin.Int)(colorIntArgb: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Transforms the input color into a new color.
Cmn

## Public companion functions

### withColorIntArgb

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun withColorIntArgb(colorIntArgb: @ColorInt Int): BrushPaint.ColorFunction.ReplaceColor
```

Returns a color function that will replace its input color with the given color.

### withColorLong

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun withColorLong(colorLong: @ColorLong Long): BrushPaint.ColorFunction.ReplaceColor
```

Returns a color function that will replace its input color with the given color.

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### colorIntArgb

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
val colorIntArgb: Int
```

The color that will replace the input color, as a `@ColorInt`.

### colorLong

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
val colorLong: Long
```

The color that will replace the input color, as a `@ColorLong`.