One good way to do this is to look closely at the sofa fabric. Is it one uniform color or does it have multiple colors in it? If it has multiple colors, an easy way to coordinate with it is to choose another fabric that is the same color as one of the threads.
If the sofa fabric is one uniform color, do not try to match it. You will never succeed in matching it exactly and it will look off. Besides, it should be different to create visual interest and contract. Choose a fabric that has a blend of colors, one of which is the color of the sofa.
Another thing to consider is warm tones and cool tones. For two pieces that will be adjacent to each other, choose textiles that are in the same family (such as two browns - both warn tones) or perhaps two grays (both cools), or choose two colors that are adjacent on the color wheel (a red and an orange, for example).
(photo courtesy of Knoll Textiles)