HINT: Since in any move you can take only balls of one color, you really have four separate piles:
$$\begin{array}{ccc} &&&\circ\\\ &&&\circ\\\ &\color{green}\bullet&\color{blue}\bullet&\circ\\\ &\color{green}\bullet&\color{blue}\bullet&\circ\\\ \color{red}\bullet&\color{green}\bullet&\color{blue}\bullet&\circ\\\ \color{red}\bullet&\color{green}\bullet&\color{blue}\bullet&\circ \end{array}$$
The red pile is one-heap takeaway with a limit of $1$ ball per move; the green pile is one-heap takeaway with a limit of $2$ balls per move; the blue pile is one-heap takeaway with a limit of $3$ balls per move; and the white pile is one-heap takeaway with a limit of $4$ balls per move. Your game is in effect the sum of these four simple games.