FilamentColor::register() not working properly
Hello everyone, I'm trying to override the default colors in my AppServiceProvider boot function, like so
And when I use a class like bg-primary-500 it works but if I use any other color it doesn't. Anyone has this problem too?
P.S. When I change the color of 'primary' the application detects that change.
Laravel: 10.10
Filament: 3.2.*
PHP: 8.2
Thanks
Solution:Jump to solution
Ok, after looking at the source code I was able to use the classes with:
```
->extraInputAttributes([
'class' => 'bg-custom-50 dark:bg-custom-400/10',...
3 Replies
I guess if you want to apply Tailwind CSS classes that are not already used in Filament, you should do this
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
and update your content configuration in tailwind.config.js to also scan for classes inside your directory:
./app/Filament/**/*.php
Hey thanks for the reply but I'm using the default colors of filament, they already exist. For example if I'm sending a notification of type success the color will be green but in the register method I say that 'success' is Color::Amber it doesn't work
Solution
Ok, after looking at the source code I was able to use the classes with: