Color Logic Order Puzzle

Drag or tap to reorder the colors so all rules are satisfied.
Arrange from position 1 to 5:
Tip: Drag a color onto another.
Rules: