I wondered what are the differences between red, black and purple SATA sockets. And i don't mean the color

So far as i read these are different controllers and the red ones are master and the black ones are slave (if in bios set to IDE mode, HDDs on black socket can't boot properly). Then what is the purple one?

Or are these SATA 1-3? I also had the problem when connecting one HDD to black socket, Windows hangs and sometimes the BIOS doesn't detect the HDD there.

I would be nice if someone could explain me the complete differences.