Hi, what exactly do you want to do?
Turn the whole canvas to grayscale? Or convert an image to grayscale?
For converting just an image, it appears it could be done if you create it as an
cc.ImageTGA ( http://www.cocos2d-x.org/reference/html5-js/V2.2.2/symbols/cc.ImageTGA.html ) and then apply the
cc.tgaRGBtogreyscale (defined in
\cocos2d\tileMap_nodes\CCTGAlib.js) method to it. I've also thought about using
cc.setColor(cc.c3b) with varying parameters, but there doesn't seem to exist a combination of RGB modifiers that will always turn an image to grayscale (althought you can get some very funky combinations).
If what you want is to convert the whole canvas to grayscale, I'm not so sure it can be done that easily in a way that wouldn't kill FPS, since you'd have to manually iterate thru every pixel on the canvas and turn it to grayscale (in which case, it would require some variation of this: www.html5rocks.com/en/tutorials/canvas/imagefilters/ ). But I might be wrong, so I'll keep on researching if I get the time.
Edit: maybe we should post a feature request in the issue tracker for some sort of canvas shaders to be implemented? Or such a thing already exists?