© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
1 reply
M.

Color For multiple badge

This data is displayed multiple, and for that reason this data is safe and appears, it only takes 1 hex_colorcode so all of them only use the same 1 color, even though I want each data to appear with the appropriate color code

i have this code
```TextEntry::make('labels.name')
->label('Labels')
->placeholder('-')
->color(function ($record) {
$color = $record->labels->first(
fn ($label) => !empty($label
>hex_color_code))?->hex_color_code;

return $color ? Color::hex($color) : null;
})```
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

badge color from color field
FilamentFFilament / ❓┊help
2y ago
Dynamic badge blade color
FilamentFFilament / ❓┊help
14mo ago
CUSTOM COLOR ON BADGE
FilamentFFilament / ❓┊help
2y ago