Look at the overall paint finish and determine the sheen. Is it flat, stain, eggshell, semi-gloss or gloss? Ensure you match the sheen as well as the color.
Flat paint has a chalky appearance and is often used on ceilings. The popular eggshell finish has a very slight sheen. A satin paint produces a slight shine, while a semi-gloss paint is visibly shiny. Gloss paint, often used for trim, has a very glossy, enamel-like appearance.
Find an inconspicuous place on your wall where you can take a quarter-sized sample. You may want to remove a switch plate or outlet cover and look at the wall behind it. Alternatively, you can choose a spot near the floor or ceiling that won't be easily noticed. The interior of a closet is another good choice if it's painted the same color as the wall that you need to repair.
Score the wall with the tip of your utility knife. You don't want to cut deep into the drywall, just through the top paper layer. Once you've scored a 1 1/2-inch square, work the tip of the knife blade underneath the paper and paint layer.
Pry off the paper/paint layer very carefully and take it into your home improvement store or paint store. They will use their computerized equipment to match the color. Don't worry about the brand of paint -- if you're able to match the color and sheen, the touch-ups shouldn't be noticeable.
Look at your exterior and try to determine the sheen. Exterior paint oxidizes over time, so it may be difficult to get an exact match. Most exterior paints tend to be semi-gloss or satin, with gloss occasionally used on shutters and trim.
Remove a piece of your house that has the correct color on it. This isn't as challenging as it sounds. Often, you can simply slip off part of a downspout, since they're generally painted to match the house.
Take the piece into your local paint store or home-improvement center so they can match it with their computerized equipment. Ensure you replace the piece that you took in for color matching.