Returns the contrast ratio between foreground and background. background must be opaque.
foreground
background
Formula defined here.