Skip to content

Branding colors

FilamentChromePlugin::make()
->primary('#F1511B')
->accent('#286291')
->darkPrimary('#C9A57B') // optional
->darkAccent('#8FCBD6') // optional
->darkGray('#18181B'); // optional
  • primary(?string $hex) — wired through Filament’s color path: the plugin builds a full primary scale and registers it with $panel->colors(['primary' => …]). Without it, the active theme’s tokens()['primary'] is used (when the theme defines one).
  • accent(?string $hex) — exposed as the --fi-chrome-accent CSS variable that themes use for highlights such as the treeline. Falls back to the theme’s tokens()['accent'].

Plugin colors always win over theme tokens.

darkPrimary(), darkAccent() and darkGray() inject .dark CSS overrides only when set. When they are omitted, Filament’s default dark logic applies — the plugin does not derive dark shades for you.

When set, each override generates a full 50–950 scale whose 500 shade is the exact input hex, emitted inside a .dark { … } block after Filament’s own color variables (at the STYLES_AFTER render hook):

Method Variables
darkPrimary() --primary-*, --color-primary-*
darkAccent() --accent-*, --fi-chrome-accent
darkGray() --gray-*, --color-gray-*

Colors accept 3- or 6-digit hex, with or without # ('#F1511B', 'f1511b', '#fa0'). null, empty strings and malformed values are treated as “not set”.

When the theme switcher is enabled, users can pick their own light / dark primary and accent. The effective color is:

  1. the user’s choice, then
  2. the plugin’s ->primary() / ->accent() / ->darkPrimary() / ->darkAccent(), then
  3. the active theme’s tokens.

Because the user’s choice is only known once the session starts, the light primary is re-emitted as :root --primary-* variables at render time.