## On the Subject of Colour Code

Codes are used for locks! Why not [include] colours?

The code is made of 4 digits and 3 colours. Each section in the manual gives you a number or colour the code contains.

### Digit 1:

Follow the statements below and use the digit of the first true statement from top to bottom as part of your code.

• 3 if the number of batteries on the bomb is 1 or less.
• 6 if there is a lit FRK indicator.
• 7 if the number of ports on the bomb is more than the number of batteries on the bomb.
• 9 if the number of lit indicators on the bomb is more than the number of solved modules.
• 2 if the sum of the number of indicators and ports on the bomb is less than the number of Colour Code modules.
• 5 if the number of batteries on the bomb is less than the number of Planets modules.
• 8 if more than 40 modules are left unsolved.
• 1 if there are exactly 2 AA batteries and exactly 2 D batteries on the bomb.
• 4 if the number of solved modules is more than half of the bomb.
• 0 if none of the above apply.

### Digit 2:

Follow the statements below and use the digit of the first true statement as your code digit. If the background colour on the module cannot be used for this table, use 0.

Background colour Statement
Red If there is a parallel port on the bomb, the digit is 5.
Otherwise the digit is 3.
Orange If the number of batteries on the bomb is more than (the number of indicators on the bomb - the number of ports on the bomb), the digit is 9.
Otherwise the digit is 4.
Green If the number of lit indicators is more than the number of Planets modules, the digit is 8.
Otherwise the digit is 1.
Yellow If the sum of the number of unsolved Colour Code and Planets modules is more than the sum of the number of solved Colour Code and Planets modules, the digit is 7.
(Note: This includes the Colour Code module itself.)
Otherwise the digit is 2.
Blue If this is the only unsolved module left on the bomb, the digit is 6.
Otherwise the digit is 0.
(Note: If there are modules that require this module to be solved, the otherwise condition will ALWAYS apply.)

### Digit 3

• Add 2 to the number of batteries and then multiply that by the number of solved modules.
• Subtract 15 if the number of lit indicators is more than the number of unlit indicators.
• Divide by 3 if the number is a multiple of 3.
• Double if a 0 is the first code digit.
• Multiply by 4 if a 0 is the second code digit.
• Modulo 10.
• The absolute value of this is the code digit.
• Click the code digit when the last digit of the seconds on the bomb timer is the code digit.

### Digit 4

• Subtract the sum of the first 3 code digits.
• Subtract the number of unsolved modules (excluding needies) on the bomb.
• Subtract the total number of Colour Code modules on the bomb.
• Add the number of unlit indicators.
• The last digit after these operations is the code digit.

Clearly my color perception is off today...

### Colour 1

Follow the statements below and use the colour of the first true statement as your code colour. If the background colour on the module cannot be used for this table, use purple.

Background colour Statement
Red If there are no ports, no indicators and no solved modules, the colour is Red.
Otherwise the colour is Purple
Orange If the sum of the digits in the serial number modulo 10 equals the number of batteries, the colour is Orange.
Otherwise the colour is Purple.
Green If the number of ports is more than the number of unlit indicators, the colour is Green.
Otherwise the colour is Purple.
Yellow If the number of unlit indicators is 1 and the last digit of the serial number is odd, the colour is Yellow.
Otherwise the colour is Purple.
Blue If the number of batteries equals the number of solved modules, the colour is Blue.
Otherwise the colour is Purple.

### Colour 2

Follow the statements below and use the colour of the first true statement as your second code colour from top to bottom in the table provided.

Code Colour Statement
Blue If the last digit of the serial number is even.
Green If there is a parallel port on the bomb.
Orange If the sum of (the number of batteries on the bomb and the sum of the digits in the serial number), modulo 10, is 5 or less.
Red If all the batteries on the bomb are AA and there is at least 1 battery.
Yellow If the background of the module is yellow.
Purple If none of the above apply.

### Colour 3

• Start with the number of unsolved modules multiplied by the number of solved modules.
• Divide by 3 if the number is a multiple of 3.
• Multiply by 2 if the first colour in the code is purple.
• Multiply by 4 if the second colour in the code is purple.
• Modulo 10.
• Multiply by the number of batteries.
• Modulo 6.
• Turn this result into a colour.
0 1 2 3 4 5
Orange Blue Red Purple Yellow Green

### Don’t forget me

If the code has exactly one 0 and one purple, submit only when the seconds digits of the timer display 04 or 40.

### Order

Moving from top to bottom, if the condition in the right column is true, use the next item in the left column. When you get to the bottom move from bottom to top, and if the condition in the right column is false, use the next item in the left column.

Type Condition
Digit Use if there are more batteries than the number for the current month (January=1, February=2, ...).
Colour Use if the product of code digits (excluding zeros) is more than the total number of modules modulo 10.
Digit Use if I am the only Colour Code module.
Colour Use if the alarm clock shows a time between 03:00 and 16:00.
Digit Use if the number of modules on the bomb is 101 or 81.
Colour Use if the number of Colour Code modules is more than the square root of half the total number of modules.
Digit Use this exactly once when going from this table top to bottom, bottom to top.