API & MCP

Everything a person can do on Resistor Color Code, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Resistor Color Code

Decode four, five or six color bands or encode an exactly representable resistance, with tolerance and temperature coefficient.

Inputs of Resistor Color Code
FieldTypeDefaultDescription
modeselect (decode, encode)"decode"Calculate
bandCountselect (4, 5, 6)"4"Number of bands
digit1select (brown, red, orange, yellow, green, blue, violet, gray, white)"brown"First significant band (decode)
digit2select (black, brown, red, orange, yellow, green, blue, violet, gray, white)"black"Second significant band (decode)
digit3select (black, brown, red, orange, yellow, green, blue, violet, gray, white)"black"Third significant band (5 or 6 bands, decode)
multiplierselect (silver, gold, black, brown, red, orange, yellow, green, blue, violet, gray, white)"red"Multiplier band (decode)
toleranceselect (silver, gold, brown, red, green, blue, violet, gray)"gold"Tolerance band
temperatureselect (brown, red, yellow, orange, blue, violet)"brown"Temperature coefficient band (6 bands)
ohmsnumber1000Resistance in ohms (encode)

Example request

Decode brown, black, red, gold

curl -X POST https://ohmforgeresistorcolorcode.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"decode","bandCount":"4","digit1":"brown","digit2":"black","multiplier":"red","tolerance":"gold"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ohmforge-resistor-color-code": { "type": "http", "url": "https://ohmforgeresistorcolorcode.usefulweb.site/mcp" }
  }
}