> ## Documentation Index
> Fetch the complete documentation index at: https://filament-34a8cf01.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Color entry

> [!WARNING]
>
> You are currently viewing the documentation for Filament 4.x, which is a previous version of Filament.
>
> Looking for the current stable version? Visit the [5.x documentation](https://filament-34a8cf01.mintlify.site/5.x/infolists/color-entry.md).

## Introduction

The color entry allows you to show the color preview from a CSS color definition, typically entered using the [color picker field](https://filament-34a8cf01.mintlify.site/4.x/forms/color-picker.md), in one of the supported formats (HEX, HSL, RGB, RGBA).

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Infolists\Components\ColorEntry;

ColorEntry::make('color')
```

Loading preview

![Color entry](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/infolists/entries/color/simple.jpg)

## Allowing the color to be copied to the clipboard

You may make the color copyable, such that clicking on the preview copies the CSS value to the clipboard, and optionally specify a custom confirmation message and duration in milliseconds. This feature only works when SSL is enabled for the app.

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Infolists\Components\ColorEntry;

ColorEntry::make('color')
    ->copyable()
    ->copyMessage('Copied!')
    ->copyMessageDuration(1500)
```

Loading preview

![Color entry with a button to copy it](https://filament-34a8cf01.mintlify.site/docs/images/4.x/light/infolists/entries/color/copyable.jpg)

Optionally, you may pass a boolean value to control if the color should be copyable or not:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Infolists\Components\ColorEntry;

ColorEntry::make('color')
    ->copyable(FeatureFlag::active())
```

<details>
  <summary />

  [Learn more about utility injection.](https://filament-34a8cf01.mintlify.site/4.x/infolists/overview.md#entry-utility-injection)
</details>

[Edit this page on GitHub](https://github.com/filamentphp/filament/edit/4.x/packages/infolists/docs/05-color-entry.md)

## Sponsored by

[Your logo here](https://github.com/sponsors/danharrin)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.