Skip to content

Instantly share code, notes, and snippets.

@herbaldrinkmate
Last active February 22, 2026 00:46
  • Select an option

Select an option

Change Firefox private browsing background from purple to grayscale via UserCSS
@charset "utf-8";
/* +-----------------------------------------------------------------+
| * Remove Purple Color From Incognito Mode * |
|-----------------------------------------------------------------|
|-------------------------------- Works on Firefox 147.0 / Win11 -|
|-------------------------------------------------- License: MIT -|
+-----------------------------------------------------------------+ */
/*
NOTE: IF FLICKERING OCCURS ----------------------------------------------------------
1. Go to `about:config` and set `browser.privatebrowsing.felt-privacy-v1` to `false`.
2. Add the following code to your `userChrome.css` file:
@media (prefers-color-scheme: dark) {
:root[privatebrowsingmode="temporary"] #tabbrowser-tabpanels,
:root[privatebrowsingmode="temporary"] .browserContainer,
:root[privatebrowsingmode="temporary"] browser {
background-color: #1C1B22 !important;
}
}
-------------------------------------------------------------------------------------
*/
@-moz-document url("about:privatebrowsing") {
/* Main background color */
@media not (prefers-contrast) {
html.private {
background: #1c1b22 !important;
}
}
/* Desaturate the logo */
.logo {
filter: grayscale(80%);
}
/* Search Box Styling */
.search-handoff-button,
.search-handoff-button:hover:not(.focused),
.search-handoff-button:active,
.search-handoff-button:enabled:hover:active {
border: 3px solid rgb(59, 59, 63) !important;
}
.search-handoff-button,
.search-handoff-button:hover:not(.focused),
.search-handoff-button:active,
.search-handoff-button:enabled:hover:active,
.search-inner-wrapper .search-handoff-button:hover,
.search-inner-wrapper .search-handoff-button:hover:active {
background-color: #28272f !important;
}
.fake-textbox {
@media not (prefers-contrast) {
color: rgb(251, 251, 254) !important;
font-size: 0.87em !important;
opacity: 1 !important;
}
}
/* Search Box Focus State */
.search-handoff-button.focused:not(.disabled) {
border: solid 1px #000 !important;
box-shadow: 0 0 0 2px #000, 0 0 0 4px rgb(0 0 0 / 0.15) !important;
}
/* Info Section */
.info {
@media not (prefers-contrast) {
background-color: rgb(0 0 0 / 0.16) !important;
}
}
.info-border {
background: transparent !important;
box-shadow: none !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment