Choose three out of five colors, as shown in Figure 4, in which two cells have the same color, and there are two cases, ***5*4*3+5*4*3= 120.
Choose two of the five colors. The four squares in Figure 4 and two non-adjacent squares have the same color, and there are 5*4=20 cases.
To sum up, * * *120+120+20 = 260 methods.
The above calculation can be arranged as a, because I can't type, so I use multiplication.