# PorterDuffKt

Added in 1.1.0

*** ** * ** ***


```
public final class PorterDuffKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PorterDuffColorFilter.html` | `https://developer.android.com/reference/androidx/core/graphics/PorterDuffKt#(android.graphics.PorterDuff.Mode).toColorFilter(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html receiver, int color)` Creates a new `https://developer.android.com/reference/android/graphics/PorterDuffColorFilter.html` that uses this `https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` as the alpha compositing or blending mode, and the specified `https://developer.android.com/reference/androidx/core/graphics/package-summary#(android.graphics.PorterDuff.Mode).toColorFilter(kotlin.Int)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PorterDuffXfermode.html` | `https://developer.android.com/reference/androidx/core/graphics/PorterDuffKt#(android.graphics.PorterDuff.Mode).toXfermode()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html receiver)` Creates a new `https://developer.android.com/reference/android/graphics/PorterDuffXfermode.html` that uses this `https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` as the alpha compositing or blending mode. |

## Public methods

### toColorFilter

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/PorterDuff.kt+function:toColorFilter) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PorterDuffColorFilter toColorFilter(@NonNull PorterDuff.Mode receiver, int color)
```

Creates a new `https://developer.android.com/reference/android/graphics/PorterDuffColorFilter.html` that uses this `https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` as the alpha compositing or blending mode, and the specified `https://developer.android.com/reference/androidx/core/graphics/package-summary#(android.graphics.PorterDuff.Mode).toColorFilter(kotlin.Int)`.

### toXfermode

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/PorterDuff.kt+function:toXfermode) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final @NonNull PorterDuffXfermode toXfermode(@NonNull PorterDuff.Mode receiver)
```

Creates a new `https://developer.android.com/reference/android/graphics/PorterDuffXfermode.html` that uses this `https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` as the alpha compositing or blending mode.