PHPackages                             ryangjchandler/filament-color-palette - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ryangjchandler/filament-color-palette

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ryangjchandler/filament-color-palette
=====================================

Let users pick a color from a fixed list of options.

v1.0.0(3y ago)866[4 PRs](https://github.com/ryangjchandler/filament-color-palette/pulls)MITPHPPHP ^8.0

Since Oct 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ryangjchandler/filament-color-palette)[ Packagist](https://packagist.org/packages/ryangjchandler/filament-color-palette)[ Docs](https://github.com/ryangjchandler/filament-color-palette)[ GitHub Sponsors](https://github.com/ryangjchandler)[ RSS](/packages/ryangjchandler-filament-color-palette/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (6)Used By (0)

Let users pick a color from a fixed list of options.
====================================================

[](#let-users-pick-a-color-from-a-fixed-list-of-options)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cc0053ae2d8ab0353de4695b1c9944b49aff47825ad22fc203324d3e717d02b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7279616e676a6368616e646c65722f66696c616d656e742d636f6c6f722d70616c657474652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/filament-color-palette)[![GitHub Tests Action Status](https://camo.githubusercontent.com/951abcaa0811cb447f77876301b5626be58c65b901233fae09a3f69e7731c985/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f66696c616d656e742d636f6c6f722d70616c657474652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ryangjchandler/filament-color-palette/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6dd9fcac2c0bfb693045cc2d9997715de72b5119dc6ff7d32805ad18e8415258/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f66696c616d656e742d636f6c6f722d70616c657474652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/ryangjchandler/filament-color-palette/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e43712a5696a21a1084b725c69db161fd562c9e3114aa50cab53cb17187159ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e676a6368616e646c65722f66696c616d656e742d636f6c6f722d70616c657474652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/filament-color-palette)

This packages implements a new `ColorPalette` field as described in [the mini-series on my blog](https://ryangjchandler.co.uk/posts/building-a-custom-color-palette-field-in-filament-part-0).

It gives users a fixed set of color options to choose from and the option to choose an arbitrary custom color.

[![](./docs/part-3-custom-colors.png)](./docs/part-3-custom-colors.png)

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require ryangjchandler/filament-color-palette
```

Usage
-----

[](#usage)

Add the field to your form like so:

```
use RyanChandler\FilamentColorPalette\ColorPalette;

ColorPalette::make('color')
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),
```

### Store color name instead of code

[](#store-color-name-instead-of-code)

You may wish to store the name (label) of a color instead of the color code. This can be achieved by calling the `storeColorName()` method on the field.

```
ColorPalette::make('color')
    ->storeColorName()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),
```

Now instead of the hex codes being stored, the name from the options array will be used instead.

### Custom colors

[](#custom-colors)

If you want your users to have some more freedom, you can allow them to choose custom colors. Call the `->allowCustomColors()` method on the field and a custom color picker will appear in the options.

```
ColorPalette::make('color')
    ->allowCustomColors()
    ->options([
        '#ffffff' => 'White',
        '#ff0000' => 'Red',
        '#000000' => 'Black',
    ]),
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ryan Chandler](https://github.com/ryangjchandler)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

laravelryangjchandlerfilament-color-palette

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ryangjchandler-filament-color-palette/health.svg)

```
[![Health](https://phpackages.com/badges/ryangjchandler-filament-color-palette/health.svg)](https://phpackages.com/packages/ryangjchandler-filament-color-palette)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
