3. (10 points) Connect the diagonals of square $A B C D$, and color the four vertices either red or yellow. Triangles with all vertices of the same color are called monochromatic triangles. The number of coloring methods that result in monochromatic triangles in the figure is ( )
A. 12
B. 17
C. 22
D. 10
【Analysis】This problem examines the coloring issue.
【Solution】Solution: All red or all yellow, 2 ways; three red and one yellow or three yellow and one red, $4 \times 2=8$ ways, so the coloring methods with same-colored triangles are $2+8=10$ (ways), hence the answer is: D.