Well , using a multimeter is a good option but it may not be available to most of us, and using it is a bit complicated and I will be posting it in my next instructable on it.
Presently, I will tell you the criterion for calculating the resistance and capacitance.(Only in ceramic capacitors as it is mentioned on electrolytic capacitors)
Step 1: MOTIVATION
As I didn't have a multimeter so I tried to understand the logic behind the codes.
Which I will be telling you.
Step 2: THE RESISTOR
For those of you who don't know what is a resistor, it is device that resists the flow of current.
The colour code is just, the resistance in the forms of coloured strips.
The colours include-
Now, the first two strips of the resistor represent the digit and the third is the multipier band .
And the fourth band gives the tolerance.
The image is from --http://www.doctronics.co.uk/resistor.htm