Nature's Solution
The hercules beetle's wing cases look khaki-green when dry and turn black when humid. A porous 3D layer under the surface scatters and diffracts light when filled with air, but when water fills the pores the difference in light-bending between materials shrinks and the colour vanishes.
How it works
About 3 micrometres below the surface sits an open porous layer made of upright pillars linked by thin layered filaments.
When the pores hold air, the big contrast between cuticle and air scatters and diffracts light back, giving a broad greenish colour.
When humidity rises, water seeps into the pores, cuts the contrast, stops the backscattering, and the darker layers beneath show through as black.
How sure are we?
3 evidence points. Worked out from the evidence we hold, not by hand.
Evidence
From NASA PeTaL (public domain). Credit NASA.
Where this comes from
Diffractive hygrochromic effect in the cuticle of the hercules beetle Dynastes hercules
Claude read this paper's abstract twice, independently, and wrote this page. No product uses it yet in our records, so it is an open idea to explore.