updated neural network color reduction with bias and frequency