Painting master cylinder cast iron gray ???

It will stay gray as long as no brake fluid slops on it. Brake fluid eats paint.