Mesh material ease in and ease out effect

hello, i have an array of mesh with unique material and i want to loop through each of them and make each have an ease in and ease out effect continuosly , i.e make the material colour ease in and ease out