BACK TO DIRECTORY

Site Grayscale Toggle

by natthasath

0.0
(0 ratings)

Site Grayscale Toggle lets you turn your entire site grayscale and give visitors a clear on/off switch. It’s built to be CSP-friendly (no inline JS) and to avoid a flash-of-unstyled-content by injecting the initial state on the server side.

Features:
Grayscale filter site-wide via html.is-grayscale { filter: grayscale(var(--sgt-level)); }.
Intensity control (0–100) from Settings Site Grayscale.
Show/Hide floating toggle button (bottom-right by default).
Shortcode: [grayscale_toggle] to place the switch anywhere (headers, menus, footers, blocks, widgets).
Remembers visitor preference with localStorage across pages.
CSP-safe: no inline JS; initial state added server-side to <html> to avoid FOUC.
– Lightweight, theme-agnostic; works alongside most caching/CDN plugins.

Use cases include memorial/monochrome modes, accessibility preferences, or design experiments that you want users to control.

Plugin Details

Active Installs
40
Total Downloads
674
Version
1.1.1
Requires WP
Requires PHP
Tested Up To
6.8.8
Added
2025-11-11
Last Updated
2025-11-11 3:12am GMT

Ratings

5
0
4
0
3
0
2
0
1
0