In the demo above ,the red
color indicates variation of displacement with time ,the green color shows the
variation of velocity with time and the blue is for acceleration with time .Note
that the velocity and acc. are 90 degrees and 180 degrees out of phase with
displacement respectively .This can also be seen in the equation m*a =- k*x.
a and x are 180degrees out of phase.
As for the energy case the red color is for PE v/s t and green for K.E v/s t.Total energy remains constant in absence of dissipative forces ,a statement confirmed by energy conservation law.