How can I add a second colour to an object?
What you are doing at the moment (I think), is applying different materials with different colors to certains faces i.e. parts of the mesh. The example image you posted is using one material for the complete mesh and distributed by some texture which is used as mix factor between two colors. A simple example - very simple, you can do so much more complex things, but I would suggest you watch more tutorials on these things because this is too much to put in single answer here - you can see in the following screenshot: