I have a class called “button”, I simply use it for all hover elements. Most of my buttons are black (background-color), and the .button:hover changes the background-color value of the items to gray.
However, some of my buttons have random colors so they lose the effect when their background-color changes to light gray. for this reason, I would like to change the “satauration” value of the hovered item instead of modifying the whole color. That way, the hover effect will base on the base color..
I was thinking… if it is possible to change the “saturation” value (only) of the background-color so that my hover effect will still be useful for random colors.
Using filter currently seems to only work for webkit-based browsers..
Demo | Source
Coupling the saturation filter with brightness seems to have the most effect, with the black being visibly affected
Demo | Source
Additional demo: http://html5-demos.appspot.com/static/css/filters/index.html