Programatically Changing the color of the Overlay Brushtool/

Hello!

How can I change the color and the size of the overlay brush programmatically? And what’s the best way to get the overlays by color?

Thanks,