The code is the number of letters in the color name. Red has 3 letters, blue has 4, etc.
oh totally didn't get that, I just bruteforced it lol
It seems like most people did :)
I did too until I looked at the comments XD
Well a pen and paper did help a lot well to write my attempts and number😅