How do bees from a hive distinguish bees that belong to another one?

Question: How do bees from a hive distinguish bees that belong to another one?

Choices:

The size
The smell
The legs
The color

Correct answer:

The color