Support separate light and dark mode favicons for self-hosted instances

(#1458) Feature Under consideration self-hosting theming

Current problem

Self-hosted instances currently only allow configuring a single favicon URL under Public App Identity. The same favicon is therefore used regardless of the active light or dark theme. Depending on the branding, this can result in poor contrast or make the favicon difficult to see against the browser UI. Fluxer already applies the configured favicon dynamically at runtime, so supporting an optional theme-specific favicon should fit into the existing branding system.

Proposed change

Add support for an optional dark mode favicon while keeping the existing favicon_url as the default and fallback. For example:
  • favicon_url — default/light favicon and fallback
  • favicon_dark_url — optional favicon used when the dark theme is active
If no dark favicon is configured, Fluxer should continue using favicon_url exactly as it does today. This would keep existing configurations fully backwards compatible. Ideally, the favicon should follow Fluxer's active theme rather than only prefers-color-scheme, since Fluxer's selected theme can differ from the operating system/browser preference.

Additional information

The current implementation already sets the custom favicon dynamically through the runtime branding configuration, so this appears to mainly require passing an additional optional value through the config/schema/admin layers and updating the favicon when the active theme changes. The self-hosted admin panel could expose this as an additional optional "Dark mode favicon URL" field next to the existing favicon setting. I asked Hampus about this in the development server and he suggested submitting a feature request so it can be tracked.

1 comment

Sign in with Fluxer to comment and vote.
Comment by @SolunaCG
RexSystem 1 vote originally by @SolunaCG on GitHub OP
Updated the proposal with a bit more implementation detail after looking through the current runtime branding code. The requested behaviour itself is unchanged.