搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

How to change body background to white instead of black?

more options

How to change body background to white instead of black? I am not a programmer or a web developer, and the black is driving me crazy!!!

How to change body background to white instead of black? I am not a programmer or a web developer, and the black is driving me crazy!!!

被選擇的解決方法

Hi, Firefox 96 now harmonizes more parts of Firefox with your toolbar theme. When the text color on your background tabs is light/white, it triggers Firefox to use a dark background on menus, the sidebar, the Library window, and various built-in pages. It also signals sites that you have a dark theme preference.

What to do about this

(1) For people not attached to their toolbar theme

The fastest workaround for now is to change your theme to one that uses dark text. By dark text I mean, for example, the built-in Light theme, or an add-on theme with black or dark text on the tabs such as:

https://addons.mozilla.org/firefox/addon/firefox-b/

I have attached a screenshot illustrating the difference between a theme with light text on the tabs and dark text on the tabs.

(2) For people who can't part with their toolbar theme

This is only a partial workaround for the built-in pages, and for websites that have light/dark responsive themes. (This is the middle panel of the attached screenshot.)

Currently, the only way to decouple your page (content) theme preference from your toolbar theme is through the back door:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(2) In the search box in the page, type or paste layout.css.prefers-color-scheme.content-override and pause while the list is filtered

(3) Double-click the preference to display an editing field, and change the value to whatever you prefer from the list below, then press Enter or click the blue check mark button to save the change.

  • 0 => Force a Dark background
  • 1 => Force a Light background
  • 2 => Follow the System theme (default in Firefox 94)
  • 3 => Follow the Browser toolbar theme (default in Firefox 95+)

The about:config page should immediately reflect your saved change.

從原來的回覆中察看解決方案 👍 0

所有回覆 (5)

more options

選擇的解決方法

Hi, Firefox 96 now harmonizes more parts of Firefox with your toolbar theme. When the text color on your background tabs is light/white, it triggers Firefox to use a dark background on menus, the sidebar, the Library window, and various built-in pages. It also signals sites that you have a dark theme preference.

What to do about this

(1) For people not attached to their toolbar theme

The fastest workaround for now is to change your theme to one that uses dark text. By dark text I mean, for example, the built-in Light theme, or an add-on theme with black or dark text on the tabs such as:

https://addons.mozilla.org/firefox/addon/firefox-b/

I have attached a screenshot illustrating the difference between a theme with light text on the tabs and dark text on the tabs.

(2) For people who can't part with their toolbar theme

This is only a partial workaround for the built-in pages, and for websites that have light/dark responsive themes. (This is the middle panel of the attached screenshot.)

Currently, the only way to decouple your page (content) theme preference from your toolbar theme is through the back door:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(2) In the search box in the page, type or paste layout.css.prefers-color-scheme.content-override and pause while the list is filtered

(3) Double-click the preference to display an editing field, and change the value to whatever you prefer from the list below, then press Enter or click the blue check mark button to save the change.

  • 0 => Force a Dark background
  • 1 => Force a Light background
  • 2 => Follow the System theme (default in Firefox 94)
  • 3 => Follow the Browser toolbar theme (default in Firefox 95+)

The about:config page should immediately reflect your saved change.

more options

Thank you, this really helps, However, I still don't like it. I will use the blinding white back ground as I have old EYES and can not use the dark. The engineers need to know that there are old people that have eye issues, and with only two colors available, will make them use a different browser.

Standing down from my soap box, is someone one who has grown up with computers.

Thank you for your detailed response,

Shirl Magana

more options

I Installed the theme "Space fantasy" and the background went black. Then I read this article and edited "layout.css.prefers-color-scheme.content-override" in Configuration Editor and set it to 2 => Follow the System theme (default in Firefox 94).

The background color changed to the normal white. So far so good. BUT. Dropdown-menus still have black background and white text and when I move the mouse pointer over the menu items at the top of the screen, they go blue and the text disappears. And the background turns black a short time when the browser switches between pages. It worked fine six months ago when I use the theme last time.

more options

shirl.magana said

I will use the blinding white back ground as I have old EYES and can not use the dark. The engineers need to know that there are old people that have eye issues, and with only two colors available, will make them use a different browser.

Hi Shirl, it probably would be a good idea to have something "in between" that is a little less bright. I'm not sure whether there is an easy way to implement that. As you probably know, add-ons can't modify most of the built-in pages. However, they can help with websites. Are there particular pages/sites where you would like the color to be less bright? Maybe we could come up with some suggestions that are not too difficult to implement.

more options

jecke said

The background color changed to the normal white. So far so good. BUT. Dropdown-menus still have black background and white text and when I move the mouse pointer over the menu items at the top of the screen, they go blue and the text disappears. And the background turns black a short time when the browser switches between pages. It worked fine six months ago when I use the theme last time.

Hi jecke, I'm not sure whether the colors on the menu bar are set by the theme author or are determined by Firefox. Either way, could you start a new question if you want to pursue it further:

https://support.mozilla.org/questions/new/desktop/form