Decode 4-band and 5-band resistor values
| Color | Digit | Multiplier | Tolerance |
|---|---|---|---|
| Black | 0 | 1 | - |
| Brown | 1 | 10 | ±1% |
| Red | 2 | 100 | ±2% |
| Orange | 3 | 1K | ±0.05% |
| Yellow | 4 | 10K | ±0.02% |
| Green | 5 | 100K | ±0.5% |
| Blue | 6 | 1M | ±0.25% |
| Violet | 7 | 10M | ±0.1% |
| Grey | 8 | 100M | ±0.01% |
| White | 9 | 1G | - |
| Gold | - | 0.1 | ±5% |
| Silver | - | 0.01 | ±10% |