Skip to content

aminought/firefox-adaptive-theme-creator

Repository files navigation

Icon
Mozilla Add-on Users Mozilla Add-on Rating Mozilla Add-on

Adaptive Theme Creator

A Firefox extension that allows you to create a unique adaptive theme for your browser. Like Adaptive Tab Bar Colour or VivaldiFox, but better.

logo_without_title

Here's what it might look like

overview.mp4

There are many features in this extension, so I have decided to create separate videos for each one.

Enabling and disabling the coloring of a specific part of the browser.

You can turn the coloring of a specific part of the browser on or off by clicking on it with the left mouse button.

on_off.mp4

Color sources

There are 3 color sources: page, favicon and own color.

sources.mp4

Page and favicon colors can be calculated with 2 similar, but different algorithms: Basic and K-means.

Basic: The number of pixels for each color is calculated, and the color with the highest number of pixels is chosen.

K-means: The number of pixels for each color is calculated. Then, all the colors are clustered using K-means. The cluster with the highest number of pixels is selected. Finally, the color with the most pixels in this cluster is chosen.

In the video, you can see that the simple algorithm makes a mistake about the color. This is because brown takes up more pixels than each shade of green, but the K-means algorithm divides brown and shades of green into different clusters. As a result, green is more common and therefore wins.

algorithms.mp4

Color options

There are 3 options to change: saturation limit like in Vivaldi Browser, darkness and brightness.

color_options.mp4

Context menu

There are 6 parts of the browser that have their own settings that can be changed independently of the global settings: Frame, Selected Tab, Toolbar, Toolbar Field, Sidebar and Popup.

By right-clicking on any part in the browser preview, you can access the context menu. This allows you to override global settings and make changes to individual parts of the browser.

context_menu.mp4

Each part of the browser has connected ones that change in the same context menu, and you can select them by clicking on the context menu header. They may inherit global settings or the settings of other parts, or they may not inherit anything at all.

inheritance.mp4