I am trying to add Tailwindcss color preset to my panel in filamentphp v3, but the colors are not being shwon.
I am following the official docs – https://filamentphp.com/docs/3.x/support/colors#registering-extra-colors
And Below is my PanelProvider code
<?php
namespace AppProvidersFilament;
use AppFilamentAuthLogin;
use FilamentHttpMiddlewareAuthenticate;
use FilamentHttpMiddlewareDisableBladeIconComponents;
use FilamentHttpMiddlewareDispatchServingFilamentEvent;
use FilamentPages;
use FilamentPanel;
use FilamentPanelProvider;
use FilamentSupportColorsColor;
use FilamentWidgets;
use IlluminateCookieMiddlewareAddQueuedCookiesToResponse;
use IlluminateCookieMiddlewareEncryptCookies;
use IlluminateFoundationHttpMiddlewareVerifyCsrfToken;
use IlluminateRoutingMiddlewareSubstituteBindings;
use IlluminateSessionMiddlewareAuthenticateSession;
use IlluminateSessionMiddlewareStartSession;
use IlluminateViewMiddlewareShareErrorsFromSession;
class PlayerPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->id('player')
->path('player')
->login(Login::class)
->brandName('KingVouchers')
->spa()
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Cyan,
'success' => Color::Emerald,
'warning' => Color::Orange,
'indigo' => Color::Indigo,
])
->discoverResources(in: app_path('Filament/Player/Resources'), for: 'App\Filament\Player\Resources')
->discoverPages(in: app_path('Filament/Player/Pages'), for: 'App\Filament\Player\Pages')
->pages([
PagesDashboard::class,
])
->discoverWidgets(in: app_path('Filament/Player/Widgets'), for: 'App\Filament\Player\Widgets')
->widgets([
// WidgetsAccountWidget::class,
// WidgetsFilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
]);
}
}
I tried following the docs and i tried running npm run dev and npm run build too, but stil lthe colors wont appear. Besides the 6 default colors provided by Filamentphp i added the Indigo but to no avail.
What should i try now ?