# SpannedSubject.Colored

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.Colored)

*** ** * ** ***


```
public interface SpannedSubject.Colored
```

<br />

*** ** * ** ***

Allows assertions about the color of a span.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags` | `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.Colored#withColor(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int color)` Checks that at least one of the matched spans has the expected `color`. |

## Public methods

### withColor

```
abstract SpannedSubject.AndSpanFlags withColor(@ColorInt int color)
```

Checks that at least one of the matched spans has the expected `color`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int color` | The expected color. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags` | A `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags` object for optional additional assertions on the flags. |