<div class="color">
A
<div class="color">
B
<div class="color">
C
</div>
</div>
</div>
<div class="color">
A
<div>
B
<div>
C
</div>
</div>
</div>
<div style='position:fixed;bottom:0;left:0;background:lightgray;width:100%;padding:3px;'>
About this question on SO
<a href='https://stackoverflow.com/q/46336002/1366033'>
How to get computed background color style inherited from parent element
</a>
</div>