easonwong-de / Adaptive-Tab-Bar-Colour

Changes the colour of Firefox tab bar to match the website theme.
https://addons.mozilla.org/firefox/addon/adaptive-tab-bar-colour/
MIT License
324 stars 12 forks source link

Make Text, Icon & Accent Color Configurable #88

Open GenericMale opened 1 month ago

GenericMale commented 1 month ago

Love this extension!! I noticed that there are some theme properties which are hardcoded right now and it would be really awesome if you could make them configurable.

Specifically the following:

These obviously need to be set for light and dark theme independently (same as Homepage color and Fallback color) and the current hardcoded values should become the defaults.

The final two theme properties which can't be controlled right now are button_background_active & button_background_hover which could be handled using sliders in the Customization section of the Options page.

Workaround

The colors can be manually overridden in the userChrome.css, e.g.:

@media (prefers-color-scheme: light) {
  :root {
    --ctp-accent: #1e66f5;
    --ctp-text: #4c4f69;
    --ctp-icon: #4c4f69;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ctp-accent: #8aadf4;
    --ctp-text: #cad3f5;
    --ctp-icon: #cad3f5;
  }
}
:root {
  --toolbar-field-focus-border-color: var(--ctp-accent) !important;
  --toolbarbutton-icon-fill: var(--ctp-icon) !important;
  --newtab-text-primary-color: var(--ctp-text) !important;
  --toolbar-color: var(--ctp-text) !important;
  --toolbar-field-color: var(--ctp-text) !important;
  --arrowpanel-color: var(--ctp-text) !important;
  --sidebar-text-color: var(--ctp-text) !important;
  --lwt-text-color: var(--ctp-text) !important;
}
easonwong-de commented 3 days ago

More customisation options will be added to the settings, but maybe only after I re-programme the whole settings page. Thanks for the suggestions!