Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Palette Laravel Package

awcodes/palette

A Filament Forms color picker field that uses preset color palettes. Stores selections as structured arrays or keys, supports Filament 4.x and 5.x, and offers publishable config for global customization.

View on GitHub
Deep Wiki
Context7

Palette is a color picker field for Filament Forms that lets users choose from preset color palettes instead of a free-form picker. It integrates seamlessly into Filament panels and standalone packages, and can be configured globally or per field.

Selected colors are stored as structured array data by default (key, property, label, type, value), though you can store only the color key with the storeAsKey() modifier.

  • Preset palette color picker fields for Filament
  • Supports Filament 4.x & 5.x
  • Publishable config for global defaults
  • Store full color data or just the key
  • Custom theme support via CSS @source directive
Frequently asked questions about Palette
How do I install awcodes/palette in a Laravel application?
Install it with composer require awcodes/palette. If you are using Filament Panels, you must already have a custom theme and add the package's Blade views to your theme CSS using the @source directive. The package works without publishing config; publish palette.php only if you need to change defaults.
Why are my Palette color picker styles not showing up in Filament?
The component styles silently fail to compile unless your Filament custom theme includes the package's views. Add @source '../../../../vendor/awcodes/palette/resources/**/*.blade.php' to your theme CSS and rebuild your assets. This missing @source line is the most common integration failure and should be treated as an explicit acceptance criterion, not a footnote.
Which Filament versions does each Palette package version support?
Palette 1.x targets Filament 3, 2.x targets Filament 4, and 3.x supports both Filament 4 and 5. The package is version-locked to Filament majors, so every Filament major upgrade forces a matching Palette major upgrade. Pin the package version to your Filament major before integrating.
How does Palette store the selected color in the database?
By default the field dehydrates a structured array containing key, property, label, type, and value. You must cast the column in your model as array or json. Array storage preserves the resolved color at the time of capture but bloats columns and complicates querying.
How do I store only the color key instead of the full array?
Use the storeAsKey() modifier on the ColorPicker or ColorPickerSelect field, or enable it globally in the palette.php config file. Key-only storage is cleaner and more portable but re-resolves the color at render time, so later palette changes retroactively alter historical records. Decide array versus key storage per entity before the first write, not after.
Can I customize the preset color palette in Palette?
Yes. Publish the config file with php artisan vendor:publish --tag="palette-config" and adjust the defaults there. The package works without publishing config if the built-in palette suits your needs, which means fewer files to own.
Does Palette support free-form hex entry, opacity, or HSL sliders?
No. Palette intentionally constrains users to a curated preset palette and offers no opacity control, HSL sliders, live preview, or arbitrary hex input. That constraint enforces brand consistency and removes unusable color choices by construction. If your roadmap includes a brand color customizer, this package is the wrong primitive.
Can I use Palette outside a Filament panel?
Standalone usage is degraded. Outside a Filament panel you must add @stack('styles') to your layouts, which was documented as a breaking change in 1.1.0. Treat non-panel contexts as out of scope unless validated by a spike.
What components does awcodes/palette actually provide?
It ships three UI components: ColorPicker and ColorPickerSelect for Filament Forms, and ColorEntry for Filament Infolists. It has no migrations, models, routes, or persistence of its own, making it a pure UI extension with a small blast radius. It is a form control, not a general color system.
Is awcodes/palette safe and maintained enough for production?
Adoption signals are thin: roughly 24 GitHub stars and zero dependents means little external production validation. The maintainer is a credible, long-standing Filament ecosystem contributor, but this is a bus factor of one for a component appearing in every themed admin form. Documentation is README-only with no API reference or upgrade guide, so expect to read the source for edge cases.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource