From 6207d8a75e40aa76008edaffbbe138bbc9f6baa4 Mon Sep 17 00:00:00 2001 From: auric <104602845+ihateamongus@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:13:57 -0500 Subject: Add dynamic Firefox accent color extension --- browsers/README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 browsers/README.md (limited to 'browsers/README.md') diff --git a/browsers/README.md b/browsers/README.md new file mode 100644 index 0000000..96ddfc3 --- /dev/null +++ b/browsers/README.md @@ -0,0 +1,40 @@ +# Browser Accent Color Experiments + +This directory contains experiments for applying the dynamic accent color +provided by `core/accent.h` to web browsers. + +## Ungoogled-Chromium + +Ungoogled Chromium exposes limited theming hooks and does not support +changing its UI colors at runtime. Applying a dynamic accent color would +require maintaining a custom patch set or an extension that continually +re-themes the browser, which is outside the scope of this repository. + +## Firefox + +Firefox can be themed programmatically. The files here demonstrate two +approaches: + +1. `firefox/update-userchrome.sh` writes a minimal `userChrome.css` using the + current accent color. Run it whenever the accent color changes. +2. `firefox/extension/` contains a small WebExtension and native messaging host + that continuously updates a `--accent-color` CSS variable across all pages. + +To use the extension: + +1. Build the helper program: + + ```sh + ./build.sh + ``` + +2. Register the native messaging host: + + ```sh + firefox/install-native-host.sh + ``` + +3. Load `firefox/extension` as a temporary extension from `about:debugging`. + +These scripts are meant as a starting point for proper browser ricing and can +be adapted to other workflows. -- cgit v1.2.3