dynamic material paint

please help me, thank you so much;


1.this is brush material;
2.this is panel material;
3.when brush color is red, it can paint on the panel;
4.but when brush color RGB , R is zero, it can not paint;