FilamentF
Filament3mo ago
CKD

Registering new colors on filament

I want to register a new color "secondary" color. I followed the steps right here:
https://filamentphp.com/docs/4.x/styling/colors#registering-extra-colors

But it seems like it does nothing, what i tried:
  • instead of using "secondary" i used a random name just to test and still nothing works.
  • i added the same color with its shade in tailwind.config.css, same issue.
  • Also tried to use
    Colors::indigo
    instead of a custom color and still the same issue
it seems that only colors that comes by default in the filament theme works.
Solution
These might be of help
https://stackoverflow.com/a/79499827
https://tailwindcss.com/docs/colors#using-a-custom-palette
So something like
@theme {  
--color-secondary-50: "#FCFCFA";  
--color-secondary-100: "#FCFCFA";
...
}

in your custom theme I guess? Haven't tried it
Was this page helpful?