# ContentColorScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+class:androidx.compose.foundation.style.ContentColorScope) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  interface ContentColorScope
  ```
Known direct subclasses [TextStyleStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleStyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleStyleScope` | An interface that introduces the text property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope. |

Known indirect subclasses [StyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` is the receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` lambda. |

*** ** * ** ***

An interface that introduces the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentColor(androidx.compose.ui.graphics.Color)` property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` |   |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentBrush(androidx.compose.ui.graphics.Brush)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush)` Sets the preferred brush for rendering content, primarily affecting text. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentColor(androidx.compose.ui.graphics.Color)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Sets the preferred content color, primarily affecting text color. | Cmn |

## Public functions

### contentBrush

Cmn Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0)

```
fun contentBrush(value: Brush): Unit
```

Sets the preferred brush for rendering content, primarily affecting text. This allows for gradient text or other brush-based text effects. This property is inherited by child text components if not overridden. This affects drawing only and is often a component of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle`.

This property is inherited.

| Parameters |
|---|---|
| `value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | The brush for the content, typically text. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentColor(androidx.compose.ui.graphics.Color)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleScope#textStyle(androidx.compose.ui.text.TextStyle)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` |   |

### contentColor

Cmn Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0)

```
fun contentColor(value: Color): Unit
```

Sets the preferred content color, primarily affecting text color. This property is inherited by child text components if not overridden. This affects drawing only and is often a component of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle`.

This property is inherited.

| Parameters |
|---|---|
| `value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | The color for the content, typically text. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ContentColorScope#contentBrush(androidx.compose.ui.graphics.Brush)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/TextStyleScope#textStyle(androidx.compose.ui.text.TextStyle)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` |   |