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

<?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,
        ]);
    }
}
Solution
In v3 configure your colors in the panel service provider.
Was this page helpful?