These appear to be two different versions of the same scene.
The purple in the foam is cool enough to indicate shadow and volume, but warm enough to contribute to the summery brightness and warmth of the painting.
In Nature, shadows are almost always coloured by light reflected from other things. Very few things are pure black or grey. Even if shadows in waves seem to be grey, it's best not to mix the grey from tube black and white. A grey mixed from two complementary colours - e.g. purple and yellow - is more alive and interesting.