Interactive demo
Three vertices, three colours. Each triangle pixel is drawn using barycentric interpolation.