[FR]: Command to regenerate helium theme based on the wallpaper #1403

Closed
opened 2026-04-20 04:55:00 +00:00 by adarshsingh87 · 5 comments
adarshsingh87 commented 2026-04-20 04:55:00 +00:00 (Migrated from github.com)

Description

Currently we can change the new tab wallpaper of the browser by replacing the background file, but the same cannot be done for the color theme.

Who's implementing?

  • I'm willing to implement this feature myself

The problem

Currently, users can personalise their New Tab Page background by programmatically replacing the local background image file. However, there is no equivalent functionality to customise the colour theme via local configuration or a command.

This limitation restricts the ability to create cohesive "ricing" or custom browser themes that align with specific wallpaper aesthetics, forcing users to settle for default colour schemes that often clash with personalised backgrounds or re-choose the wallpaper after opening the browser to generate the theme.

Possible solutions

Option 1: Add a command that can be called in the bash script to regenerate the color theme based on the updated background image
Option 2: Move the theming to a seperate theme.css/theme.json file so that the file can be regenerated using matugen or pywal
Option 3: Regenerate the theme colours every time a new browser session is launched.

Additional context

No response

### Description Currently we can change the new tab wallpaper of the browser by replacing the background file, but the same cannot be done for the color theme. ### Who's implementing? - [ ] I'm willing to implement this feature myself ### The problem Currently, users can personalise their New Tab Page background by programmatically replacing the local background image file. However, there is no equivalent functionality to customise the colour theme via local configuration or a command. This limitation restricts the ability to create cohesive "ricing" or custom browser themes that align with specific wallpaper aesthetics, forcing users to settle for default colour schemes that often clash with personalised backgrounds or re-choose the wallpaper after opening the browser to generate the theme. ### Possible solutions Option 1: Add a command that can be called in the bash script to regenerate the color theme based on the updated background image Option 2: Move the theming to a seperate `theme.css`/`theme.json` file so that the file can be regenerated using matugen or pywal Option 3: Regenerate the theme colours every time a new browser session is launched. ### Additional context _No response_
adarshsingh87 commented 2026-09-09 05:17:35 +00:00 (Migrated from github.com)

Hi, do we have any update on this?

Hi, do we have any update on this?
adarshsingh87 commented 2026-09-09 05:17:35 +00:00 (Migrated from github.com)

Hi, do we have any update on this?

Hi, do we have any update on this?
adarshsingh87 commented 2026-09-09 05:17:35 +00:00 (Migrated from github.com)

Hi, do we have any update on this?

Hi, do we have any update on this?
adarshsingh87 commented 2026-09-09 05:17:35 +00:00 (Migrated from github.com)

Hi, do we have any update on this?

Hi, do we have any update on this?
Axenide commented 2026-11-16 16:18:44 +00:00 (Migrated from github.com)

You can already achieve live theme switching using pywal, matugen, or a bash script by combining Chromium's native BrowserThemeColor policy with the --refresh-platform-policy flag (which works out of the box in Helium without needing to restart the browser).

Here is how to set it up on Linux:

1. Create the managed policies directory

Helium reads Chromium's standard policy path. Create the directory and give your user write permissions so your wallpaper script doesn't require sudo every time:

sudo mkdir -p /etc/chromium/policies/managed
sudo chmod 777 /etc/chromium/policies/managed

2. Generate the policy JSON via template

Create a template for pywal (e.g., ~/.config/wal/templates/helium-policy.json) or matugen that outputs a single seed color:

{
  "BrowserThemeColor": "{background}"
}

(Chromium/Helium uses this hex code as a Material You seed color to automatically generate the full UI palette).

3. Update and live-reload from your script

Whenever your wallpaper changes, copy the generated JSON into the policies folder and trigger a live refresh on the running Helium instance:

cp ~/.cache/wal/helium-policy.json /etc/chromium/policies/managed/theme.json
helium-browser --refresh-platform-policy --no-startup-window

The --no-startup-window flag ensures it signals the active window to reload the new colors immediately without opening a new browser window.

You can already achieve live theme switching using `pywal`, `matugen`, or a bash script by combining Chromium's native `BrowserThemeColor` policy with the `--refresh-platform-policy` flag (which works out of the box in Helium without needing to restart the browser). Here is how to set it up on Linux: ### 1. Create the managed policies directory Helium reads Chromium's standard policy path. Create the directory and give your user write permissions so your wallpaper script doesn't require `sudo` every time: ```bash sudo mkdir -p /etc/chromium/policies/managed sudo chmod 777 /etc/chromium/policies/managed ``` ### 2. Generate the policy JSON via template Create a template for `pywal` (e.g., `~/.config/wal/templates/helium-policy.json`) or `matugen` that outputs a single seed color: ```json { "BrowserThemeColor": "{background}" } ``` *(Chromium/Helium uses this hex code as a Material You seed color to automatically generate the full UI palette).* ### 3. Update and live-reload from your script Whenever your wallpaper changes, copy the generated JSON into the policies folder and trigger a live refresh on the running Helium instance: ```bash cp ~/.cache/wal/helium-policy.json /etc/chromium/policies/managed/theme.json helium-browser --refresh-platform-policy --no-startup-window ``` The `--no-startup-window` flag ensures it signals the active window to reload the new colors immediately without opening a new browser window.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
imputnet/helium#1403
No description provided.