# Resistor Color Code > Decode and encode resistor bands Decode four, five or six color bands or encode an exactly representable resistance, with tolerance and temperature coefficient. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ohmforgeresistorcolorcode.usefulweb.site/ (interactive tool at https://ohmforgeresistorcolorcode.usefulweb.site/tool) - JSON API: POST https://ohmforgeresistorcolorcode.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://ohmforgeresistorcolorcode.usefulweb.site/api/v1/tool) - OpenAPI: https://ohmforgeresistorcolorcode.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://ohmforgeresistorcolorcode.usefulweb.site/mcp - tool `ohmforge_resistor_color_code` ## Inputs - mode (select): Calculate - bandCount (select): Number of bands - digit1 (select): First significant band (decode) - digit2 (select): Second significant band (decode) - digit3 (select): Third significant band (5 or 6 bands, decode) - multiplier (select): Multiplier band (decode) - tolerance (select): Tolerance band - temperature (select): Temperature coefficient band (6 bands) - ohms (number): Resistance in ohms (encode) ## Method - Reads two significant digits for four bands and three for five or six bands, then applies the multiplier and tolerance. - The optional sixth band is the temperature coefficient in ppm/K. Uses the conventional mappings documented in the linked Vishay chart. - Encoding requires an exactly representable value and never silently rounds to a preferred series. - The minimum and maximum are nominal resistance multiplied by one minus or plus tolerance; they do not include temperature effects. - The nominal value is also checked against the IEC 60063 preferred-number series E6, E12, E24, E48, E96 and E192 (exact match of the significant digits). ## Limits - This covers conventional four-, five- and six-band resistor markings. Manufacturers may use different markings, and color appearance or orientation can be ambiguous. Confirm against the component datasheet and measure when uncertain.