On the Optimization of “Alien Colors”

Somehow, it’s harder to sort colors than sorting names.

This module contains 8 different colored buttons split into two columns.

Your mission is to press the eight buttons in the correct order.

If you make an incorrect input in the sequence, a strike will occur and the module will reset with new combinations.

Ordering

Using the table on the second page, if the last digit of the serial number is even, read the color combinations top to bottom.
Otherwise, read the color combinations bottom to top.
Then, follow all rules below that apply, in the order listed top to bottom:

  1. If there are 3 or more ports, White should be pressed last.
  2. If the sum of the 3rd and 6th digits of the serial number is divisible by 3, White & Magenta should be pressed first.
  3. If there are more D batteries than AA batteries, Yellow & Blue should be pressed first.
  4. If there are more lit indicators than unlit, Magenta should be pressed first and White & Orange should be pressed last.

If there are multiple color combinations that should be pressed first, apply the color combinations to be pressed first, bottom to top of the rules applied.

If there are multiple color combinations that should be pressed last, apply the color combinations to be pressed last, top to bottom of the rules applied.

After figuring out the order, press the corresponding colors on the module.

NOTE: A color combination is NOT shown due to the module not using this.

White
Red
Orange
Yellow
Green
Blue
Magenta
White & Red
White & Orange
White & Yellow
White & Green
White & Blue
White & Violet
White & Magenta
Red & Orange
Red & Yellow
Red & Green
Red & Blue
Red & Violet
Red & Magenta
Orange & Yellow
Orange & Green
Orange & Blue
Orange & Violet
Orange & Magenta
Yellow & Green
Yellow & Blue
Yellow & Violet
Yellow & Magenta