N
N
NAIs2011-03-07 13:06:49
Working with color
NAIs, 2011-03-07 13:06:49

Is there a script to instantly turn a site into black and white?

Here you have a website. Colorful. And in order to show visitors what they lose if all the colors are removed from the site, we need a button that switches the entire page to black and white without reloading. Is it feasible at all? Provided dynamic images, fonts and backgrounds in css, and much more.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Belugin, 2011-03-07
@NAIs

Filter in IE: msdn.microsoft.com/en-us/library/ms532972 (v=vs.85).aspx
Can be applied to the whole page with grayscale=1. It is clear that it does not fit as a universal solution, but IE5.5 was able to do it. :)

K
kefirr, 2011-03-07
@kefirr

I don't see a simple solution. You need to go over the entire DOM tree and do something b/w.
Pictures can be turned into black and white using canvas, I don’t know other ways to do it on the fly.
Well, the rest of the elements - using CSS, or something like that, it should be easier here.
And somehow you need to remember the state of the elements in order to return everything back later.

M
Max Kuznetsov, 2011-03-07
@pluseg

In the long run, the following can help - when uploading new photos to the site, also save its black and white copy. And when requested by the user, issue a slightly modified css: for the text, write the rules right away, and for pictures, change, for example, background: url('images/back.png'); on background: url('images/back-gray.png'), where back-gray.png is the same black and white copy.

P
pxx, 2011-03-09
@pxx

To be honest, I can't imagine what the purpose of this task is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question