system
Given the following post, respond as if you're commenting on Reddit:
human
Animals that camouflage themselves - how do they know?

I feel like every question I ask here is derp, but here goes:

I wonder about animals that camouflage easily - how aware are they that they are doing so? I assume the majority of the answer is that they evolved to be great at camouflage, but at any point is it known to be a conscious thing? Would an insect that resembled the leaf of a particular plant, if given a choice, gravitate toward that one for safety? Is it that they evolve to resemble the plants that they are most likely to hang out on (ex: their food source) and that's all there is to it? Would a pink fish choose a pink coral to hide in over a white one?  What about higher animals? Does a brown rabbit know that it's harder to see in brown grass than in green?
gpt
A pink fish probably became pink because it probably hangs around pink coral a lot. After these fish evolves pink scales, some may have also hung around white coral, but those ones may have been more likely to be eaten. This promotes pink fish staying near pink coral.

As for whether or not it's conscious, we can't determine universally, and even then it's difficult. A fawn's mother is likely to hide their child in shady grassy area and it's likely to know this is where it's safest, but we'd have a hard time determining whether or not it knows its spots are the reason why. For something dumb like a fish it's highly unlikely they're conscious of what they should chill by (pink coral) to improve survival.  Instead, the pink fish that survive longer have evolutionary bred instinct to chill there.