Skip to content

Fix 500 error when picking Mauve, Olive, Mist or Taupe as the accent colour - #401

Merged
jbrooksuk merged 1 commit into
cachethq:mainfrom
ashwinuae:fix-500-new-colours
Jul 31, 2026
Merged

Fix 500 error when picking Mauve, Olive, Mist or Taupe as the accent colour#401
jbrooksuk merged 1 commit into
cachethq:mainfrom
ashwinuae:fix-500-new-colours

Conversation

@ashwinuae

Copy link
Copy Markdown
Contributor

Selecting Mauve, Olive, Mist or Taupe (introduced to Filament's Color::all() via Tailwind v4.2) as the status page accent colour via Manage Theme, currently throws a 500. ThemeData's THEMES and GRAYS (and THEME_PAIRINGS) lists were hardcoded and weren't updated with the new shades, so they showed up as in the Accent dropdown with no definitions to back them. Choosing any of these broke every consumer of ThemeData.

Changes

  • Added mauve, olive, mist and taupe to ThemeData::GRAYS, since they seemed like a right fit in the base colour set, and not accents.
  • Made the lookups non-fatal, so an already-persisted value can't leave a setup with a permanently broken status page:
    • an unknown accent falls back to the Cachet palette.
    • matchPairing() accepts ?string and falls back to zinc.
    • a null accent_content falls back to the matched pairing.
  • Replaced constant("Filament\Support\Colors\Color::{$pairingKey}") in compileCss() with a keyed Color::all() lookup, for the same reason as above; i.e. not to throw an invalid pairing.

Tests

Added 'tests/Unit/Data/ThemeDataTest.php' that steps through every option the accent and accent-content dropdowns actually offer (derived from Color::all() rather than hardcoded) and asserts each one compiles.

…colour

Co-authored-by: Claude <noreply@anthropic.com>
@jbrooksuk
jbrooksuk merged commit c7c7b6f into cachethq:main Jul 31, 2026
28 checks passed
@jbrooksuk

Copy link
Copy Markdown
Member

Thanks!

@ashwinuae
ashwinuae deleted the fix-500-new-colours branch July 31, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants