I have created Image. How to convert color Image to black&white. For example, on mouse over it.
First open it in a decent image editor, convert it to grayscale (I assume that you want more colors than black and white ;) ), save it in the webapplication.
Then, on the mouseover just call some JavaScript function which changes the src
of the HTML <img>
element to point to the URL of the grayscale image instead.
Basic kickoff example:
<img src="color.jpg" onmouseover="this.src='blackwhite.jpg'">
The easiest way is to create another image in black and white server side (or using an image editing program if the image isn't dynamic) and swap out the color one for b&w on mouse over.
edit
Then just just set the opacity using css: http://www.quirksmode.org/css/opacity.html
The Pixastic JS Image Manipulation library has this feature, which you can call via JSNI.
There's also this script which appears to only work in IE using proprietary Microsoft magic.
But honestly, just generate a desaturated image for every image you want on the server-side, and swap them out using JS/CSS.