Skip to main content

Introduction

Color entries display a visual preview of CSS color values. They work with colors in HEX, HSL, RGB, and RGBA formats, typically used alongside the color picker field.
The entry displays a colored square or circle representing the color value stored in your data.

Available Methods

Copy to Clipboard

bool|Closure
Enable copying the color value to clipboard when clicked.
string|Closure
Set a custom message shown when the color is copied.
int|Closure
Set the duration in milliseconds for the copy confirmation message.

State Management

Color entries inherit all base entry methods for working with state:
Closure
Manually set the color value state.

Supported Color Formats

The color entry supports all standard CSS color formats:
  • HEX: #FF5733, #F57
  • RGB: rgb(255, 87, 51)
  • RGBA: rgba(255, 87, 51, 0.5)
  • HSL: hsl(9, 100%, 60%)
  • HSLA: hsla(9, 100%, 60%, 0.5)

Examples

Basic Color Preview

Copyable Color

Multiple Colors

Computed Color

Color with Tooltip

Color Scheme Preview

Conditional Display

Working with Arrays

When the state contains an array of colors, the color entry will display multiple color previews:

Best Practices

Color Validation

Ensure color values are in valid CSS format before storing:

Accessibility

Provide descriptive labels and tooltips:

Default Values