Wrapper for modifying the opacity of an object.