Created
December 24, 2025 11:13
Change Firefox private browsing background from purple to grayscale via Custom CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ┌───────────────────────────────────────────────┐ | |
| │ * Remove Purple Color From Incognito Mode * │ | |
| │ Works on Firefox 146.0 │ | |
| │ License: MIT │ | |
| └───────────────────────────────────────────────┘ */ | |
| @-moz-document url("about:privatebrowsing") { | |
| /* NOTE: If you experience heavy flickering, place the following at the beginning. */ | |
| :root.private, | |
| :root.private body { | |
| background-color: #1C1B22 !important; | |
| } | |
| /* Main background color */ | |
| @media -moz-pref("browser.privatebrowsing.felt-privacy-v1") { | |
| @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, | |
| .search-inner-wrapper .search-handoff-button:hover, | |
| .search-inner-wrapper .search-handoff-button:hover:active { | |
| @media not (prefers-contrast) { | |
| background-color: #28272F !important; | |
| } | |
| } | |
| @media -moz-pref("browser.privatebrowsing.felt-privacy-v1") { | |
| .search-handoff-button, | |
| .search-handoff-button:hover:not(.focused), | |
| .search-handoff-button:active, | |
| .search-handoff-button:enabled:hover:active { | |
| @media not (prefers-contrast) { | |
| border-color: #3B3B3F !important; | |
| } | |
| } | |
| /* Info Section */ | |
| .info { | |
| @media not (prefers-contrast) { | |
| background-color: #28272F !important; | |
| box-shadow: none !important; | |
| } | |
| } | |
| .info-border { | |
| @media not (prefers-contrast) { | |
| box-shadow: none !important; | |
| background: #3B3B3F !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 rgba(0 0 0 / 0.15) !important; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment