silver lining (n.)
a "bright side" which proverbially accompanies even the darkest trouble; by 1843, apparently from oft-quoted lines from Milton's "Comus," where the silver lining is the light of the moon shining from behind the cloud.
Was I deceived? or did a sable cloud
Turn forth her silver lining on the night?
I did not err, there does a sable cloud,
Turn out her silver lining on the night
And casts a gleam over this tufted grove.
To which Thomas Warton added the commentary: "When all succour ſeems to be lost, Heaven unexpectedly presents the ſilver lining oſ a ſable cloud to the virtuous."