Use transparent gray instead of white or black to modify transparency, fixes #3727