Let us take this sentence, "he passed with flying colors." He can be replaced by any name and the phrase "passed with flying colors" means that that person took a test and really did well. It is usually used in the context of taking tests or having job interviews, basically anything where some type of measurement is being made and doing very well.