---
description: |
Converts the entire page to grayscale.
Toggles the page color on and off.
####### Other Metadata #######
authors: |
Bookmarklets
Kyle Suttlemyre
originalsource: https://cdpn.io/bookmarklets/fullpage/NobJbq
####### function signature #######
specs: stdout
layout: script
# for syntax see: https://jsdoc.app/tags-type.html
params: |
{bool} on - turn on or off. If null or undefined it will toggle
returns: |
{bool} isGrayscale
---
function i(i) {
document.body.style.filter = i, document.body.style.webkitFilter = i;
}
if(on!=null){
window.isGrayscale=!!on
}
window.isGrayscale ? (i("none"), window.isGrayscale = !1) : (i("grayscale(1)"), window.isGrayscale = !0);
return window.isGrayscale;