Converts resistance values to color code and vice versa.