You cannot change these colors, but what you can change is which side(s) each slot connects to.
These are standard input/output colors for Mekanism. For example, the input (4) is red and the output (6) is dark blue. These ' slots' in the user interface are places where items can be inserted or ejected from the machine. Notice in the GUI above that several of the objects have a colored border. Upgrade input and upgrade information panel ( Speed & Energy).Power item input, if using a battery or redstone power source.Open Input/Output configuration panel.1 The Basic Graphical User Interface (GUI).