# ColorBuilders.ColorProp

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ColorBuilders.java+class:androidx.wear.protolayout.ColorBuilders.ColorProp) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class ColorBuilders.ColorProp
```

<br />

*** ** * ** ***

A property defining a color.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int` | `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp#getArgb()()` Gets the static color value, in ARGB format. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicColor` | `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp#getDynamicValue()()` Gets the dynamic value. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp#toString()()` |

## Public methods

### getArgb

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @ColorInt int getArgb()
```

Gets the static color value, in ARGB format. If a dynamic value is also set and the renderer supports dynamic values for the corresponding field, this static value will be ignored. If the static value is not specified, zero (equivalent to `https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT`) will be used instead.

### getDynamicValue

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @Nullable DynamicBuilders.DynamicColor getDynamicValue()
```

Gets the dynamic value. Note that when setting this value, the static value is still required to be set to support older renderers that only read the static value. If `
dynamicValue` has an invalid result, the provided static value will be used instead.

### toString

```
public @NonNull String toString()
```