add rgba contrast checking by converting rgba to a solid rgb color

This converts both background and text from rgba to a solid rgb color during contrast checking.

Heads up: I'm not a js/node expert, nor am I a color expert, so I would like if this could be reviewed carefully.  :)