F
Filament2mo ago
wazkaz

Badge component color using hex

Hello, I am using the Badge Filament Blade component, and I would like to change its color by passing a hex code, but it is not working. I tried using the TextColumn badge functionality to change the color with a hex code, and it worked like this: Color::hex($record->attributeOptions->first()->color_code); However, when I try to achieve the same with the Blade component, it doesn't work. Can anyone help me with this?
5 Replies
wazkaz
wazkazOP2mo ago
Okay, but the colors are unpredictable because they are picked using the color picker on another part of the app.
wazkaz
wazkazOP2mo ago
the problem is the color attribute expect string and the Color::hex($record->attributeOptions->first()->color_code); make an array
Want results from more Discord servers?
Add your server