On the Subject of Chromaswapper

Colo(u)rswapper, alternatively

This module consists of a 6×6 grid of tiles.
Each tile has a digit and a colored border.

Selecting any pair of these tiles will swap the colored borders.

For any given tile, if the number of adjacent cells that match said tile’s color match the digit on the tile, the digit will turn green.
Otherwise, it will remain red.

To solve the module, turn all 36 digits green.

Clues to a particular solution

Valid solutions may be found that do not satisfy the following conditions, but there is always one that satisfies them all.

Marked rows/columns

Each row and column is marked with either a < sign, > sign, or = sign.

These signs all represent the number of colors (which are yet to be determined) within that row or column, and whether that number is less than, equal to, or greater than 3.

Determining the colors of the signs

Go through the following conditions in order and stop at the first one that applies to determine your priority string.

Condition Priority String
If there is a lit BOB indicator, and a port plate containing exactly a DVI-D port and an RJ-45 port 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
If any column of digits sums to 23 or more 1QAZ2WSX3EDC4RFV5TGB6YHN7UJM8IK9OL0P
If the bomb’s voltage is at least 3 SPEAKING3V1LBCDFHJMOQRTUWXYZ02456789

Continued...

Condition Priority String
If there is a module with the word “swap” in its name other than this one present on the bomb WATCH98JEOPRDY76LX54BKS32FUN10VQIZGM
If there are at least 4 distinct port types 36THE9FIV2BOXNG5WZARDS80JUMP1QCKLY47
If there is a widget present on the bomb HIWDGET1029384756ZYXVUSRQPONMLKJFCBA
If there are an equal number of AA batteries and D batteries WXZUN4CO7PY1RI8GH5TA3BL6ED0FJ1KM9QSV
If any row of digits sums to 6 or less 1THE3QUICK5BROWN7FX9JMPS0V24LAZY6DG8
Otherwise 0PLO98IKMJU76YHNBGT54RFVCDE32WSXZAQ1

Next, create a string of length 3 based on the priority string and the serial number.

Go through the priority string in order, and if that character is present in the serial number, add it to the string.
Duplicate serial number characters are added as many times as they appear within the serial number.

Treat each character as a base-36 digit, and turn it into 4-digit ternary to get a ternary string of length 12.

Every 0 represents red, every 1 represents yellow, and every 2 represents blue.

Assign these colors to the signs along the outside of the module, starting at the top left, continuing right, then continuing downwards towards the bottom.