[android-components](../../index.md) / [mozilla.components.support.ktx.android.content.res](../index.md) / [android.content.res.Resources](index.md) / [pxToDp](./px-to-dp.md)

# pxToDp

`fun `[`Resources`](https://developer.android.com/reference/android/content/res/Resources.html)`.pxToDp(pixels: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/content/res/Resources.kt#L9)

Converts a value in density independent pixels (pxToDp) to the actual pixel values for the display.

