How to know what color of paint was used on the walls?
Take a paint chip from a hidden location to the store, they will match it for you. It's a fairly common practice. Just realize that paint fades, so even a perfect match to your chip may not be a perfect match to the entire wall. It's best to paint at least up to a corner, if not the entire room. If that's not possible, then practice blending your patch into the rest of the wall by going over it with a mostly dry roller and a light touch.