---
title: "LocalContentColor"
description: "CompositionLocal containing the preferred content color for a given position in the hierarchy.
This typically represents the `on` color for a color in `ColorScheme`. For example, if the
background color is `surface`, this color is typically set to `onSurface`.

This color should be used for any typography / iconography, to ensure that the color of these
adjusts when the background color changes. For example, on a dark background, text should be
light, and on a light background, text should be dark.

Defaults to [Color.Black] if no color has been explicitly set."
type: "property"
---

<div class='type'>Property</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
val LocalContentColor = compositionLocalOf { Color.Black }
```


CompositionLocal containing the preferred content color for a given position in the hierarchy.
This typically represents the `on` color for a color in `ColorScheme`. For example, if the
background color is `surface`, this color is typically set to `onSurface`.

This color should be used for any typography / iconography, to ensure that the color of these
adjusts when the background color changes. For example, on a dark background, text should be
light, and on a light background, text should be dark.

Defaults to `Color.Black` if no color has been explicitly set.



