Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@ZachHunter I think I misinterpreted the question - I thought that the square $z^2$ needed to be the same colour as $x,y$. I'll edit my answer, thank you.
@ZachHunter but my point was, once you partition out the non squares (which clearly don't contain a solution) you just need to partition the square numbers. So we only have to worry about the case when $x,y$ are square, which is why I claim its equivalent to the Pythagorean triple problem. I may be wrong though, so if I misunderstood your comment let me know!
@GerryMyerson yes it does, thank you for pointing this out. I guess if $S$ is a finite set then it holds, but for infinite sets it certainly does not. I will add an edit to mark this in my answer.