Something similar happened to me a few years ago. I pitched camp at 10k feet elevation in a field of large boulders, on a moonless summer evening, and for reasons I no longer recall I wandered a few hundred yards away. My tent was red but it blended well into the boulder field once the sun fully set. So I spent a cold night huddled underneath a large boulder trying to keep myself warm. In the morning light it was a short and obvious walk back to my tent. If there had been bad weather it could have been worse. It is not difficult to be lulled into a false sense of security.
You did a common thing, as described in post 9.