# NavigationItemColors

Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/NavigationItem.kt+class:androidx.compose.material3.NavigationItemColors) Common/AllAndroid/JVM
- Cmn

  ```
  class NavigationItemColors
  ```

*** ** * ** ***

Represents the colors of the various elements of a navigation item.

## Summary

| ### Public constructors |
|---|---|
| `[NavigationItemColors](https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#NavigationItemColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color))( selectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedIndicatorColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` **This function is deprecated.** Use the NavigationItemColors constructor that takes selectedTextColorTopIconPosition and selectedTextColorStartIconPosition | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#NavigationItemColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( selectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedTextColorTopIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedTextColorStartIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedIndicatorColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` create an instance with arbitrary colors. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( selectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedTextColorTopIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedTextColorStartIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, selectedIndicatorColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, unselectedTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` Returns a copy of this NavigationItemColors, optionally overriding some of the values. | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#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/compose/material3/NavigationItemColors#hashCode()()` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#iconColor(kotlin.Boolean,kotlin.Boolean)(selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the icon color for this item, depending on whether it is `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#iconColor(kotlin.Boolean,kotlin.Boolean)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#textColor(kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)(selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, isIconPositionTop: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents the text color for this item, depending on whether it is `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#textColor(kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#disabledIconColor()` the color to use for the icon when the item is disabled. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#disabledTextColor()` the color to use for the text label when the item is disabled. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#selectedIconColor()` the color to use for the icon when the item is selected. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#selectedIndicatorColor()` the color to use for the indicator when the item is selected. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#selectedTextColor()` **This property is deprecated.** Use selectedTextColorTopIconPosition instead | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#selectedTextColorStartIconPosition()` the color to use for the text label when the item is selected and is in the Start icon position configuration. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#selectedTextColorTopIconPosition()` the color to use for the text label when the item is selected and is in the Top icon position configuration. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#unselectedIconColor()` the color to use for the icon when the item is unselected. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#unselectedTextColor()` the color to use for the text label when the item is unselected. | Cmn |

## Public constructors

### NavigationItemColors

Cmn

```
[NavigationItemColors](https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#NavigationItemColors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color))(
    selectedIconColor: Color,
    selectedTextColor: Color,
    selectedIndicatorColor: Color,
    unselectedIconColor: Color,
    unselectedTextColor: Color,
    disabledIconColor: Color,
    disabledTextColor: Color
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the NavigationItemColors constructor that takes selectedTextColorTopIconPosition and selectedTextColorStartIconPosition, use this instead:
>
> ```kotlin
> NavigationItemColors(selectedIconColor, selectedTextColorTopIconPosition, selectedTextColorStartIconPosition, selectedIndicatorColor, unselectedIconColor, unselectedTextColor, disabledIconColor, disabledTextColor)
> ```

### NavigationItemColors

Cmn

```
NavigationItemColors(
    selectedIconColor: Color,
    selectedTextColorTopIconPosition: Color,
    selectedTextColorStartIconPosition: Color,
    selectedIndicatorColor: Color,
    unselectedIconColor: Color,
    unselectedTextColor: Color,
    disabledIconColor: Color,
    disabledTextColor: Color
)
```

create an instance with arbitrary colors.

| Parameters |
|---|---|
| `selectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the icon when the item is selected. |
| `selectedTextColorTopIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the text label when the item is selected and is in the Top icon position configuration. |
| `selectedTextColorStartIconPosition: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the text label when the item is selected and is in the Start icon position configuration. |
| `selectedIndicatorColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the indicator when the item is selected. |
| `unselectedIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the icon when the item is unselected. |
| `unselectedTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the text label when the item is unselected. |
| `disabledIconColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the icon when the item is disabled. |
| `disabledTextColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to use for the text label when the item is disabled. |

## Public functions

### copy

Cmn

```
fun copy(
    selectedIconColor: Color = this.selectedIconColor,
    selectedTextColorTopIconPosition: Color = this.selectedTextColorTopIconPosition,
    selectedTextColorStartIconPosition: Color = this.selectedTextColorStartIconPosition,
    selectedIndicatorColor: Color = this.selectedIndicatorColor,
    unselectedIconColor: Color = this.unselectedIconColor,
    unselectedTextColor: Color = this.unselectedTextColor,
    disabledIconColor: Color = this.disabledIconColor,
    disabledTextColor: Color = this.disabledTextColor
): NavigationItemColors
```

Returns a copy of this NavigationItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean "use the value from the source".

### equals

Cmn

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

### hashCode

Cmn

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

### iconColor

Cmn

```
fun iconColor(selected: Boolean, enabled: Boolean): Color
```

Represents the icon color for this item, depending on whether it is `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#iconColor(kotlin.Boolean,kotlin.Boolean)`.

| Parameters |
|---|---|
| `selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the item is selected |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the item is enabled |

### textColor

Cmn

```
fun textColor(
    selected: Boolean,
    enabled: Boolean,
    isIconPositionTop: Boolean = true
): Color
```

Represents the text color for this item, depending on whether it is `https://developer.android.com/reference/kotlin/androidx/compose/material3/NavigationItemColors#textColor(kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`.

| Parameters |
|---|---|
| `selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the item is selected |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether the item is enabled |
| `isIconPositionTop: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | whether the icon is at the top position |

## Public properties

### disabledIconColor

Cmn

```
val disabledIconColor: Color
```

the color to use for the icon when the item is disabled.

### disabledTextColor

Cmn

```
val disabledTextColor: Color
```

the color to use for the text label when the item is disabled.

### selectedIconColor

Cmn

```
val selectedIconColor: Color
```

the color to use for the icon when the item is selected.

### selectedIndicatorColor

Cmn

```
val selectedIndicatorColor: Color
```

the color to use for the indicator when the item is selected.

### selectedTextColor

Cmn

```
val selectedTextColor: Color
```

> [!CAUTION]
> **This property is deprecated.**   
> Use selectedTextColorTopIconPosition instead, use this instead:
>
> ```kotlin
> selectedTextColorTopIconPosition
> ```

### selectedTextColorStartIconPosition

Cmn

```
val selectedTextColorStartIconPosition: Color
```

the color to use for the text label when the item is selected and is in the Start icon position configuration.

### selectedTextColorTopIconPosition

Cmn

```
val selectedTextColorTopIconPosition: Color
```

the color to use for the text label when the item is selected and is in the Top icon position configuration.

### unselectedIconColor

Cmn

```
val unselectedIconColor: Color
```

the color to use for the icon when the item is unselected.

### unselectedTextColor

Cmn

```
val unselectedTextColor: Color
```

the color to use for the text label when the item is unselected.