# ColorBuilders.ColorProp

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp "View this page in Java")

<br />

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

<br />

*** ** * ** ***

A property defining a color.

## Summary

|                                                                                                                               ### Nested types                                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[ColorBuilders.ColorProp.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp.Builder) Builder for[ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) |

|                                                                           ### Public functions                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getArgb](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp#getArgb())`()` Gets the static color value, in ARGB format. |
| [DynamicBuilders.DynamicColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicColor)`?`                      | [getDynamicValue](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp#getDynamicValue())`()` Gets the dynamic value.      |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                        | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp#toString())`()`                                            |

## Public functions

### getArgb

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

```
fun getArgb(): @ColorInt Int
```

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[TRANSPARENT](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)  

```
fun getDynamicValue(): DynamicBuilders.DynamicColor?
```

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

```
fun toString(): String
```