4. Use red, yellow, blue, and green to color the four small squares $A, B, C, D$ in Figure 1 (using any of the colors), such that adjacent areas (squares with a common edge) are different colors. The number of different coloring methods is ( ).
(A) 24
(B) 36
(C) 72
(D) 84
4.D.

Choosing two colors has $\mathrm{C}_{4}^{2}$ ways, selecting diagonals for one color has 2 ways, totaling $2 \mathrm{C}_{4}^{2}=12$ ways;

Choosing three colors has $\mathrm{C}_{4}^{3}$ ways, among which one color is repeated and has $\mathrm{C}_{3}^{1}$ ways to choose, the repeated color has 2 ways to choose diagonals, and the other two colors have 2 ways to choose, totaling $4 \times 3 \times 2 \times 2=48$ ways;

Using all four colors has $4!=24$ ways (since $A, B, C, D$ are fixed positions).
In total, there are 84 ways.