In the context of the AIGC era, the traditional art and design field is undergoing profound changes, and the rationality and scientificity of the design professional curriculum system directly affects the quality of its talent cultivation. This paper explains the characteristics of contextualized teaching of art design under the theory of constructivism, and under its guidance, constructs the contextualized teaching mode of art design based on AIGC to cultivate students’ design ability. Taking the application of color matching in the cultivation of design ability as an example, the DCGAN network is chosen to design the automatic color matching algorithm. Two classes of art design majors in a university are selected as experimental samples to complete the practical application of art design contextualized teaching mode. The experimental analysis proves the superiority of the proposed color matching algorithm, which can be used to assist students in improving their color perception and matching ability. After applying the proposed teaching mode, the students’ professional performance and design ability improved by 23.84% and 8.64% respectively compared with those of the control group, and there was a significant difference at the 5% level, indicating that the contextualized teaching based on AIGC helps to promote the development of students’ design ability.