2022-09-30 11:39:35 -04:00
|
|
|
---
|
2022-10-25 09:18:18 -04:00
|
|
|
group: Widgets
|
|
|
|
title: Color
|
|
|
|
weight: 12
|
2022-09-30 11:39:35 -04:00
|
|
|
---
|
2022-11-02 15:42:21 -04:00
|
|
|
## Overview
|
|
|
|
|
|
|
|
- **Name**: `color`
|
|
|
|
- **UI**: Color picker
|
|
|
|
- **Data type**: `string`
|
2022-09-30 11:39:35 -04:00
|
|
|
|
|
|
|
The color widget translates a color picker to a color string.
|
|
|
|
|
2022-11-02 13:18:06 -04:00
|
|
|
## Widget options
|
|
|
|
|
|
|
|
For common options, see [Common widget options](/docs/widgets#common-widget-options).
|
|
|
|
|
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| ------------ | ------- | ------- | ---------------------------------------------------------- |
|
|
|
|
| default | string | `''` | _Optional_. The default value for the field |
|
|
|
|
| allow_input | boolean | `false` | _Optional_. Allows manual editing of the color input value |
|
|
|
|
| enable_alpha | boolean | `false` | _Optional_. Enables Alpha editing |
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
### Basic
|
|
|
|
```yaml
|
|
|
|
name: color
|
|
|
|
label: Color
|
|
|
|
widget: color
|
|
|
|
```
|
|
|
|
|
|
|
|
### Kitchen Sink
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: color
|
|
|
|
label: Color
|
|
|
|
widget: color
|
|
|
|
enable_alpha: true
|
|
|
|
allow_input: true
|
|
|
|
```
|