blob: 96ddfc3d0300d6da14da12e41f173eebed7a4206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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.
|