calculating the color code of resistor by input the values