I'm attempting to fade between an array of colours – so the element would infinite fade between all the colours.
var colours = ['#ca4234', '#cec6be', '#6c786e'],
homeAnimationTLArray = [];
// eslint-disable-next-line no-undef
var homeAnimationTL = new TimelineMax({
repeat: -1
});
colours.forEach(function(item, index) {
var tl = new TimelineMax(); // eslint-disable-line no-undef
tl.to('.home__splash', 1, {
backgroundColor: item
});
homeAnimationTLArray.push(tl);
});
homeAnim