# ColorBuilders

# ColorBuilders

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)  
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 "View this page in Java")

<br />

```
class ColorBuilders
```

<br />

*** ** * ** ***

Builders for color utilities for layout elements.

## Summary

|                                                                                                                                                                                                                                                                ### Nested types                                                                                                                                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` `interface `[ColorBuilders.Brush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.Brush) Interface defining a[Brush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.Brush)describes how something is drawn on screen.                                                                            |
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` `class `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) A property defining a color.                                                                                                                                                                                                                  |
| `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)                                                                                                                                                                                                                                                                    |
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` `class `[ColorBuilders.ColorStop](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop) A color and an offset, determining a color position in a gradient.                                                                                                                                                                          |
| `class `[ColorBuilders.ColorStop.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop.Builder) Builder for[ColorStop](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorStop)                                                                                                                                                                                                                                                                    |
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 500)` `class `[ColorBuilders.LinearGradient](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.LinearGradient)` : `[ColorBuilders.Brush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.Brush) A linear gradient with the provided colors based on defined start and end coordinates.                    |
| `class `[ColorBuilders.LinearGradient.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.LinearGradient.Builder) Builder for[LinearGradient](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.LinearGradient).                                                                                                                                                                                                                                               |
| `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` `class `[ColorBuilders.SweepGradient](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.SweepGradient)` : `[ColorBuilders.Brush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.Brush) A sweep gradient with the given colors dispersed around its center with offsets defined in each color stop. |
| `class `[ColorBuilders.SweepGradient.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.SweepGradient.Builder) Builder for[SweepGradient](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.SweepGradient).                                                                                                                                                                                                                                                   |

|                                                           ### Public functions                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [argb](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders#argb(int))`(colorArgb: @`[ColorInt](https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt)` `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Shortcut for building a[ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)using an ARGB value. |

## Public functions

### argb

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
java-static fun argb(colorArgb: @ColorInt Int): ColorBuilders.ColorProp
```

Shortcut for building a[ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)using an ARGB value.