{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"resistor-color-code"},"result":{"entity_type":"calculator","id":"resistor-color-code","calculator_id":"resistor-color-code","canonical_url":"https://tttkmbb.com/engineering/resistor-color-code","name":"Resistor Color Code Calculator","title":"Resistor Colour Code Calculator – 4-Band and 5-Band Decoder and Value-to-Colour Encoder","category":"engineering","category_name":"Engineering & Automotive","tool_name":"convert_resistor_color_code","featured_mcp_tool":false,"description":"Decodes the colour bands of a 4-band or 5-band resistor (IEC 60062) into its resistance, tolerance and min/max values, or encodes a resistance value into the 4-band (or 5-band) colour sequence.","use_when":"You need to read a resistor's bands (band colours in, ohms out) or find the bands for a given resistance value.","do_not_use_when":"The part is an SMD resistor with a printed numeric code, a 6-band resistor (temperature coefficient band is ignored), or you need the resistor value for a circuit (use led-resistor or voltage-divider).","inputs":[{"name":"band1","label":"Band 1","type":"enum","required":false,"values":[{"value":"black","label":"Black (0)"},{"value":"brown","label":"Brown (1)"},{"value":"red","label":"Red (2)"},{"value":"orange","label":"Orange (3)"},{"value":"yellow","label":"Yellow (4)"},{"value":"green","label":"Green (5)"},{"value":"blue","label":"Blue (6)"},{"value":"violet","label":"Violet (7)","aliases":["purple"]},{"value":"grey","label":"Grey (8)","aliases":["gray"]},{"value":"white","label":"White (9)"}],"description":"First significant digit colour (band nearest the end).","example":"yellow"},{"name":"band2","label":"Band 2","type":"enum","required":false,"values":[{"value":"black","label":"Black (0)"},{"value":"brown","label":"Brown (1)"},{"value":"red","label":"Red (2)"},{"value":"orange","label":"Orange (3)"},{"value":"yellow","label":"Yellow (4)"},{"value":"green","label":"Green (5)"},{"value":"blue","label":"Blue (6)"},{"value":"violet","label":"Violet (7)","aliases":["purple"]},{"value":"grey","label":"Grey (8)","aliases":["gray"]},{"value":"white","label":"White (9)"}],"description":"Second significant digit colour.","example":"violet"},{"name":"band3","label":"Band 3 (5-band only)","type":"enum","required":false,"values":[{"value":"black","label":"Black (0)"},{"value":"brown","label":"Brown (1)"},{"value":"red","label":"Red (2)"},{"value":"orange","label":"Orange (3)"},{"value":"yellow","label":"Yellow (4)"},{"value":"green","label":"Green (5)"},{"value":"blue","label":"Blue (6)"},{"value":"violet","label":"Violet (7)","aliases":["purple"]},{"value":"grey","label":"Grey (8)","aliases":["gray"]},{"value":"white","label":"White (9)"}],"description":"Third significant digit colour for 5-band resistors; omit for 4-band."},{"name":"multiplier","label":"Multiplier band","type":"enum","required":false,"values":[{"value":"black","label":"Black (0)"},{"value":"brown","label":"Brown (1)"},{"value":"red","label":"Red (2)"},{"value":"orange","label":"Orange (3)"},{"value":"yellow","label":"Yellow (4)"},{"value":"green","label":"Green (5)"},{"value":"blue","label":"Blue (6)"},{"value":"violet","label":"Violet (7)","aliases":["purple"]},{"value":"grey","label":"Grey (8)","aliases":["gray"]},{"value":"white","label":"White (9)"},{"value":"gold","label":"Gold (×0.1)"},{"value":"silver","label":"Silver (×0.01)"}],"description":"Multiplier colour: black ×1, brown ×10, red ×100, orange ×1k, yellow ×10k, green ×100k, blue ×1M, violet ×10M, grey ×100M, white ×1G, gold ×0.1, silver ×0.01.","example":"red"},{"name":"tolerance","label":"Tolerance band","type":"enum","required":false,"default":"gold","values":[{"value":"brown","label":"Brown (±1 %)"},{"value":"red","label":"Red (±2 %)"},{"value":"green","label":"Green (±0.5 %)"},{"value":"blue","label":"Blue (±0.25 %)"},{"value":"violet","label":"Violet (±0.1 %)","aliases":["purple"]},{"value":"grey","label":"Grey (±0.05 %)","aliases":["gray"]},{"value":"gold","label":"Gold (±5 %)"},{"value":"silver","label":"Silver (±10 %)"},{"value":"none","label":"None (±20 %)"}],"description":"Tolerance colour: brown ±1 %, red ±2 %, green ±0.5 %, blue ±0.25 %, violet ±0.1 %, grey ±0.05 %, gold ±5 %, silver ±10 %, none ±20 %.","example":"gold"},{"name":"resistance_ohm","label":"Resistance to encode","type":"number","unit":"Ω","required":false,"max":100000000000,"exclusive_min":0,"description":"Give a resistance in ohms (e.g. 4700) to get its colour bands instead of decoding; band inputs are then ignored."}],"outputs":[{"name":"mode","label":"Mode","type":"string","decimals":4,"description":"'decode' (colours → value) or 'encode' (value → colours)."},{"name":"resistance_ohm","label":"Resistance","type":"number","unit":"Ω","decimals":4,"description":"Nominal resistance."},{"name":"resistance_formatted","label":"Resistance","type":"string","decimals":4,"description":"Nominal resistance with SI prefix, e.g. 4.7 kΩ."},{"name":"tolerance_percent","label":"Tolerance","type":"number","unit":"%","decimals":2,"description":"Tolerance from the tolerance band."},{"name":"min_resistance_ohm","label":"Minimum resistance","type":"number","unit":"Ω","decimals":4,"description":"Nominal × (1 − tolerance)."},{"name":"max_resistance_ohm","label":"Maximum resistance","type":"number","unit":"Ω","decimals":4,"description":"Nominal × (1 + tolerance)."},{"name":"band_count","label":"Number of bands","type":"integer","decimals":4,"description":"4 or 5."},{"name":"band_colors","label":"Band colours","type":"string_list","decimals":4,"description":"Colours from the first digit band to the tolerance band."},{"name":"color_code","label":"Colour code","type":"string","decimals":4,"description":"The bands as a hyphen-separated string, e.g. yellow-violet-red-gold."}],"input_schema":{"type":"object","properties":{"band1":{"description":"First significant digit colour (band nearest the end).","type":"string","enum":["black","brown","red","orange","yellow","green","blue","violet","grey","white"],"examples":["yellow"]},"band2":{"description":"Second significant digit colour.","type":"string","enum":["black","brown","red","orange","yellow","green","blue","violet","grey","white"],"examples":["violet"]},"band3":{"description":"Third significant digit colour for 5-band resistors; omit for 4-band.","type":"string","enum":["black","brown","red","orange","yellow","green","blue","violet","grey","white"]},"multiplier":{"description":"Multiplier colour: black ×1, brown ×10, red ×100, orange ×1k, yellow ×10k, green ×100k, blue ×1M, violet ×10M, grey ×100M, white ×1G, gold ×0.1, silver ×0.01.","type":"string","enum":["black","brown","red","orange","yellow","green","blue","violet","grey","white","gold","silver"],"examples":["red"]},"tolerance":{"description":"Tolerance colour: brown ±1 %, red ±2 %, green ±0.5 %, blue ±0.25 %, violet ±0.1 %, grey ±0.05 %, gold ±5 %, silver ±10 %, none ±20 %.","type":"string","enum":["brown","red","green","blue","violet","grey","gold","silver","none"],"default":"gold","examples":["gold"]},"resistance_ohm":{"description":"Give a resistance in ohms (e.g. 4700) to get its colour bands instead of decoding; band inputs are then ignored. Unit: Ω.","type":"number","maximum":100000000000,"exclusiveMinimum":0,"x-unit":"Ω"}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"mode":{"description":"'decode' (colours → value) or 'encode' (value → colours).","type":"string"},"resistance_ohm":{"description":"Nominal resistance. Unit: Ω.","type":"number","x-unit":"Ω"},"resistance_formatted":{"description":"Nominal resistance with SI prefix, e.g. 4.7 kΩ.","type":"string"},"tolerance_percent":{"description":"Tolerance from the tolerance band. Unit: %.","type":"number","x-unit":"%"},"min_resistance_ohm":{"description":"Nominal × (1 − tolerance). Unit: Ω.","type":"number","x-unit":"Ω"},"max_resistance_ohm":{"description":"Nominal × (1 + tolerance). Unit: Ω.","type":"number","x-unit":"Ω"},"band_count":{"description":"4 or 5.","type":"integer"},"band_colors":{"description":"Colours from the first digit band to the tolerance band.","type":"array","items":{"type":"string"}},"color_code":{"description":"The bands as a hyphen-separated string, e.g. yellow-violet-red-gold.","type":"string"}}},"formula":"4-band: R = (10·d1 + d2) × multiplier; 5-band: R = (100·d1 + 10·d2 + d3) × multiplier; digits black 0 … white 9; min/max = R × (1 ∓ tolerance/100)","sources":[{"name":"Wikipedia – Electronic color code (IEC 60062)","url":"https://en.wikipedia.org/wiki/Electronic_color_code","type":"reference","retrieved_at":"2026-09-24"},{"name":"Digi-Key – Resistor color code calculator and reference (4, 5 and 6 bands)","url":"https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"5-band brown-black-black-red-brown","inputs":{"band1":"brown","band2":"black","band3":"black","multiplier":"red","tolerance":"brown"},"expected":{"mode":"decode","resistance_ohm":10000,"resistance_formatted":"10 kΩ","tolerance_percent":1,"min_resistance_ohm":9900,"max_resistance_ohm":10100,"band_count":5,"color_code":"brown-black-black-red-brown"},"url":"https://tttkmbb.com/api/v1/calculate/resistor-color-code?band1=brown&band2=black&band3=black&multiplier=red&tolerance=brown"},{"name":"Encode 4.7 kΩ ±5 %","inputs":{"resistance_ohm":4700},"expected":{"mode":"encode","band_count":4,"band_colors":["yellow","violet","red","gold"],"color_code":"yellow-violet-red-gold","min_resistance_ohm":4465,"max_resistance_ohm":4935},"url":"https://tttkmbb.com/api/v1/calculate/resistor-color-code?resistance_ohm=4700"}],"faq":[{"q":"Which end do I read from?","a":"The tolerance band (gold, silver or a band set apart by a wider gap) is last; read from the opposite end. Gold or silver can never be a first band."},{"q":"Why can't a value be encoded?","a":"Colour bands hold only 2 (4-band) or 3 (5-band) significant digits and a power-of-ten multiplier down to ×0.01. Values like 4735 Ω or 0.047 Ω have no exact code; round to a preferred (E-series) value."}],"tags":["resistor color code","resistor colour code","color bands","4 band resistor","5 band resistor","resistor value"],"related":[{"calculator_id":"led-resistor","reason":"Find the resistor value you need before reading its bands."},{"calculator_id":"resistors-series-parallel","reason":"Combine several decoded resistors."},{"calculator_id":"ohms-law","reason":"Use the decoded value in V = I·R."}],"links":{"html":"https://tttkmbb.com/engineering/resistor-color-code","markdown":"https://tttkmbb.com/engineering/resistor-color-code.md","json":"https://tttkmbb.com/engineering/resistor-color-code.json","api":"https://tttkmbb.com/api/v1/calculate/resistor-color-code","schema":"https://tttkmbb.com/api/v1/calculators/resistor-color-code","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:52:04Z","next_actions":[{"tool":"run_calculator","calculator_id":"resistor-color-code","reason":"Run Resistor Color Code Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/engineering/resistor-color-code.md"}}