# 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)

*** ** * ** ***


```
public final class BrushPaint.ColorFunction.ReplaceColor extends BrushPaint.ColorFunction
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.ink.brush.BrushPaint.ColorFunction](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction) ||
|   | ↳ | [androidx.ink.brush.BrushPaint.ColorFunction.ReplaceColor](https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor) |

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#getColorIntArgb()()` The color that will replace the input color, as a `@ColorInt`. |
| `final @https://developer.android.com/reference/androidx/annotation/ColorLong long` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#getColorLong()()` The color that will replace the input color, as a `@ColorLong`. |
| `int` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#toString()()` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#withColorIntArgb(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int colorIntArgb)` Returns a color function that will replace its input color with the given color. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor` | `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction.ReplaceColor#withColorLong(kotlin.Long)(@https://developer.android.com/reference/androidx/annotation/ColorLong long colorLong)` Returns a color function that will replace its input color with the given color. |

### Inherited methods

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

Returns the minimum required `https://developer.android.com/reference/androidx/ink/brush/Version` for this `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction`.
`final @https://developer.android.com/reference/androidx/annotation/ColorInt int` `https://developer.android.com/reference/androidx/ink/brush/BrushPaint.ColorFunction#transformColorIntArgb(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int colorIntArgb)`

Transforms the input color into a new color.

## Public methods

### equals

```
public boolean equals(Object other)
```

### getColorIntArgb

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

```
public final @ColorInt int getColorIntArgb()
```

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

### getColorLong

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

```
public final @ColorLong long getColorLong()
```

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```

### withColorIntArgb

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

```
public static final @NonNull BrushPaint.ColorFunction.ReplaceColor withColorIntArgb(@ColorInt int colorIntArgb)
```

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

### withColorLong

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

```
public static final @NonNull BrushPaint.ColorFunction.ReplaceColor withColorLong(@ColorLong long colorLong)
```

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