encode_resistor_value
Convert a resistance value in ohms to its resistor color band sequence for standard or precision resistors.
Instructions
Encode a resistance value into color bands.
Converts a resistance value (in ohms) to the corresponding color band sequence.
Examples: 4700Ω, 5% → Yellow, Violet, Red, Gold 1000Ω, 1% → Brown, Black, Black, Brown, Brown (5-band)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bands | No | Number of bands: 4 (standard) or 5 (precision) | |
| resistance_ohms | Yes | Resistance value in ohms (e.g., 4700 for 4.7kΩ) | |
| tolerance_percent | No | Tolerance percentage: 1, 2, 5, or 10 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |