The bands on a resistor are two digits, a multiplier and a tolerance. This gives the code for every value that is actually manufactured at ±5% — the E24 series — and each value has its own page answering the question from either end: the bands you need for a value, or the value a set of bands means.
The tables the code is built from
Colour
Digit
Multiplier
Tolerance
black
0
× 1
—
brown
1
× 10
± 1%
red
2
× 100
± 2%
orange
3
× 1,000
—
yellow
4
× 10,000
—
green
5
× 100,000
± 0.5%
blue
6
× 1,000,000
± 0.25%
violet
7
—
± 0.1%
grey
8
—
—
white
9
—
—
gold
—
÷ 10
± 5%
silver
—
÷ 100
± 10%
Which end to read from
The tolerance band sits slightly further from the other three, and it is gold or silver on most resistors. Neither gold nor silver is a digit colour, so a gold or silver band is telling you which end is the last one — start reading from the other. On a resistor with no gold or silver at all, the wider gap before the last band is the only clue, and it is worth measuring rather than guessing.
Why these values and not round ones
E24 is 24 values per decade, spaced so that the ±5% ranges of neighbouring values very nearly meet. There is no gap left between one value and the next, so there is nothing to be gained by making anything in between — which is why a shop sells 4.7 kΩ and 5.1 kΩ but not 5 kΩ. The ±10% series, E12, uses half as many values for the same reason.