A pretty easy way is to use hue-rotate filter:
https://developer.mozilla.org/fr/docs/Web/CSS/filter-function/hue-rotate()
With this, you can call marker._icon.style.webkitFilter = "hue-rotate(xdeg)"
var random_value = Math.floor(Math.random() * 360);
marker._icon.style.webkitFilter = "hue-rotate(" + parseString(random_value) + "deg)";
where xrandom_value is a number between 0 and 360.
It will apply a color depending on this value.