1. ## Resistor Standard value

I made application on C# that converts resistor value to colors.I want to show closest standard value and to show color of closest standard value when checkbox is checked?

How to do this:
First I should select the resistance-row (E6 , E12 , E24 , ...).
According to this selection I get the base-values for the row - for example E12 means 1.0 , 1.2 , 1.5 , 1.8 , 2.2 , and so on.
Now I should calculate the row-multiplier. For example if I Input 1344 Ohm multiplier for the base-values is 1000.
Than I should take this multiplier, iterate through the row-values and multiply those value with the multiplier and compare if one value is smaller (or equal) than your entered resistor-value.
Now I should check, which difference is smaller : to the last value of the row or to the next value of the row. The one with the smallest difference should be my reference-resistor.

With this resistor-value I should build color-table and not each resistance-row has the same count of color-rings.

2. I suppose it helps to know that resistance values within a decade are logarithmic.

3. Can it be made like this for E12:

int i = 0;
for (i = 0; i < E12.Length; i++)
{
p = E12[i] * mul;
if (p <= val)
{
r = Math.Abs(p - val);
}
}
]

4. Link for people who did not know about E6, E12, E24, E48, E96, E192 and resistors values.

Resistor Values E6 E12 E24 E48 E96 E192

Turns out I learned the E12 10% resistor values years, ago.
I forgot if I ever knew it was called E12 resistor series.

A better link Standard Resistor Values >> Resistor Guide from a math view point.

Tim S.