You have 6 wooden blocks, each can be 1 of 6 colors. There will always be either (A) 3 blocks of the same color, or (B) 3 blocks of different colors.
Iterating through all possibilities:
6 of 1 color - case A
5 of 1 color, 1 of another - case A
4 of 1 color, 2 of another - case A
4 of 1 color, 1 of another, 1 of yet another - case A and B
3 of 1 color, 3 of another - case A
3 of 1 color, 2 of another, 1 of yet another - case A and B
3 of 1 color, 1 of another, 1 of yet another, 1 of another another - case A and B
2 of 1 color, 2 of another, 2 of yet another - case B
2 of 1 color, 2 of another, 1 of yet another, 1 of another another - case B
2 of 1 color, 1 of another, 1 of yet another, 1 of another another, 1 of another another another - case B
all colors different - case B