© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
22 replies
Scott

Primary Color for v3?

Hi guys,

I'm trying to set the primary colour for buttons etc on the new v3. When looking at the docs it says you can use an array: https://beta.filamentphp.com/docs/3.x/support/colors

But I'm getting an error
Filament\Support\Colors\ColorManager::Filament\Support\Colors\{closure}(): Argument #1 ($color) must be of type string, array given
Filament\Support\Colors\ColorManager::Filament\Support\Colors\{closure}(): Argument #1 ($color) must be of type string, array given


<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Model;
use Filament\Support\Colors\Color;
use Filament\Support\Facades\FilamentColor;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        // Disable mass assignment protection. Filament handles this
        Model::unguard();

        FilamentColor::register([
            'danger' => Color::Red,
            'gray' => Color::hex('#694398'),
            'info' => Color::Blue,
            'primary' => [
                50 => Color::hex('#694398'),
                100 => Color::hex('#694398'),
                200 => Color::hex('#694398'),
                300 => Color::hex('#694398'),
                400 => Color::hex('#694398'),
                500 => Color::hex('#694398'),
                600 => Color::hex('#694398'),
                700 => Color::hex('#694398'),
                800 => Color::hex('#694398'),
                900 => Color::hex('#694398'),
                950 => Color::hex('#694398'),
            ],
            'success' => Color::Green,
            'warning' => Color::Amber,
        ]);
    }
}
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Model;
use Filament\Support\Colors\Color;
use Filament\Support\Facades\FilamentColor;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        // Disable mass assignment protection. Filament handles this
        Model::unguard();

        FilamentColor::register([
            'danger' => Color::Red,
            'gray' => Color::hex('#694398'),
            'info' => Color::Blue,
            'primary' => [
                50 => Color::hex('#694398'),
                100 => Color::hex('#694398'),
                200 => Color::hex('#694398'),
                300 => Color::hex('#694398'),
                400 => Color::hex('#694398'),
                500 => Color::hex('#694398'),
                600 => Color::hex('#694398'),
                700 => Color::hex('#694398'),
                800 => Color::hex('#694398'),
                900 => Color::hex('#694398'),
                950 => Color::hex('#694398'),
            ],
            'success' => Color::Green,
            'warning' => Color::Amber,
        ]);
    }
}
Colors - Core Concepts - Filament
Solution
In v3 configure your colors in the panel service provider.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Dark mode different primary color
FilamentFFilament / ❓┊help
15mo ago
Panel primary color in widget
FilamentFFilament / ❓┊help
3y ago
Issue with primary color theme.
FilamentFFilament / ❓┊help
3y ago
Change AdminPanelProvider primary color through model
FilamentFFilament / ❓┊help
3y ago