Why is black and yellow such a nice camouflage?
What makes a camouflage effective? It has to match the colors and color patterns of the habitat.

Here are two cheetahs



Here is another cheetah



Here is a leopard



Here is a jaguar



Overall, it looks like their yellow and black pattern is a pretty good camouflage.

The jaguar habitat is a mixture of open and forested habitats. One would think, the jaguar would gain by being a little greener but there is a good reason for the jaguar not being green (see Why is green fur not a thing?).

Note also that it would be a mistake to think that any species should be perfectly adapted to its environment. You might want to have a look at the paragraph Did you say Natural Selection? in this answer for a very short intro to why populations might sometimes be less adapted than a naive observer may expect. There might have an important phylogenetic signal among these felidae (you might to have a look at the paragraph Why 4 legs? in the same answer as indicated above).