badge color from color field
Hi. My APP has a "priority" model with a name and a 'color' field.
My "ticket" model belongsTo a priority, so I need to show the badge in the corresponding color.
Any example? Thanks
My "ticket" model belongsTo a priority, so I need to show the badge in the corresponding color.
Any example? Thanks

Solution
When you have a hexadecimal value you can use: Color::hex();
https://filamentphp.com/docs/3.x/support/colors#generating-a-custom-color-from-a-hex-code
To help you to the end result:
https://filamentphp.com/docs/3.x/support/colors#generating-a-custom-color-from-a-hex-code
To help you to the end result:
>color(fn ($record) => Color::hex($record->priority->color))