calculate brightness() only for color values; fixes #1599
Return brightness as a css function if it doesn't have the right signature.