Disclaimer: I know nearly nothing about biology.
My understanding is that camouflage evolved gradually with individuals that looked more like their environment even slightly being less likely to be eaten.
I might be understanding this wrong, but it seems aposematism could not have evolved like this because you really can't distinguish slight aposematism from just being bad at camouflage.
Take a second to think about how aposematism works, you will notice the underlying mechanism works even without distinctive coloration.
Bad at camouflage means more likely to be spotted which also means more likely to be identified.
If a wolf eats a pale green frog and gets sick it is likely to avoid pale green frogs. Avoidance works by itself regardless as long as the thing doing the avoiding can identify the toxic animal, aposematism just makes it work better by making identification easier. Even if the frog is well camouflaged avoidance still works if it is toxic, but it works better if the wolves can easily tell what it is.
If the coloration is distinctive enough, or is used my several toxic organisms, predators just start avoiding that color or pattern entirely.