FilamentF
Filament16mo ago
morty

Added colour not working

I've added the following colours to my site in a service provider with the following code:

    public function boot(): void
    {
        FilamentColor::register([
            'primary' => Color::Indigo,
            'secondary' => Color::Stone,
            'info' => Color::Blue,
            'success' => Color::Green,
            'warning' => Color::Yellow,
            'danger' => Color::Red,
            'gray' => Color::Gray,
            'red' => Color::Red,
            'orange' => Color::Orange,
            'yellow' => Color::Yellow,
            'green' => Color::Green,
            'blue' => Color::Blue,
            'purple' => Color::Purple,
            'pink' => Color::Pink,
        ]);
    }


However, when I try to use one of them in a view like so:

<span class="rounded-full bg-blue-200 px-2 py-1 text-xs text-blue-600">Test</span>


It doesn't colour anything. What am I doing wrong?

(I've built assets)
CleanShot_2024-08-28_at_21.27.10.png
Solution
You need a custom theme if you are using any custom views so you can tell tailwind to scan those files.
Was this page helpful?