But with 6 nodes you must have a triangle that is all the same color. It is the edges that are colored, not the nodes.
For example, 6 friends in a loop can be divided into even and odd trios, where each trio has no direct friend connections within it.
But six people in two separate triangles fall into the other category, with two trios of mutual friends.
Notice how both of these cases give each person 2 friends. It's not nearly as simple as assigning everyone a color at the start.
Another thing to think about: If you have a triangle of 3, and a line of 3, then you can find 3 mutual friends and three mutual non-friends. How would you use colors to differentiate this situation from the two-triangles situation?
It's not "you have a group of 3 or you don't".
You can have all six people tangled up in lots of different combinations, so how do you prove there's a way to pick three that only connect indirectly?
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
As an exercise, try repeating your same argument for 5 colors/blocks, and note that it still works, when it shouldn't.
[1] - https://commons.wikimedia.org/wiki/File:RamseyTheory_K5_no_m...