If the wall is in good condition and the paints are chemically the same (both latex, for instance), you have a few options when the new paint is the opposite shade of the old paint. You can use a primer to thoroughly cover the old colour, then apply 1 or 2 coats of the new paint.