Thanks to http://www.javascripter.net/faq/hextorgb.htm
function hexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function hexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function hexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
this is my quick resolve function:
function resolve(){var hex = $('#alerter')[0].innerHTML; if(window.getComputedStyle($('#rightButton')[0])['background-color'] == "rgb("+hexToR(hex)+", "+hexToG(hex)+", "+hexToB(hex)+")"){$('#rightButton')[0].click()}else{$('#leftButton')[0].click()} }
run this in a loop ;)