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

*** ** * ** ***


```
public final class ColorBuilders
```

<br />

*** ** * ** ***

Builders for color utilities for layout elements.

## Summary

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

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders#argb(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int colorArgb)` Shortcut for building a `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` using an ARGB value. |

## Public methods

### argb

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public static @NonNull ColorBuilders.ColorProp argb(@ColorInt int colorArgb)
```

Shortcut for building a `https://developer.android.com/reference/androidx/wear/protolayout/ColorBuilders.ColorProp` using an ARGB value.