The colors for the Ihop restaurant don’t really work in my view. Ihop is a restaurant that is known for its breakfast pancakes, and other warm breakfast foods. The color blue is probably one of the least appetising colors, so it does not make the restaurant seem like a warm place that serves breakfast. It sort of takes away the feeling being a warm restaurant which is what they usually try to convey in their commercials.
The NASA logo, on the other hand, correctly uses the color blue. NASA is a space/astronautical organization, and when you think about space you usually think about a cold and empty color, so blue is a good choice. The red lines also make a nice contrast with the blue and white.