This looks like an Aplysia, or "sea hare", a marine gastropod. Some of them sometimes get stranded and look like fat violet/green/brown blobs, around 10cm diameter. In the water, they swim slowly. I've seen some in Brittany (France) and in Algarve (Portugal).
As bli said it is Aplysia more specifically Aplysia fasciata ,commonly called Sooty sea hare.
It is an Atlantic species of gastropod mollusc of the family Aplysiidae.
This sea hare occurs in the Western Atlantic from New Jersey to Brazil, and in the Eastern Atlantic including the Mediterranean and the West African coast.