This is an idea that came to me while considering opening brace on the current line vs opening brace on the next line. Why not make nested code blocks subtlety alternate between different colors (like RES on reddit for comments). I made a quick demo to demonstrate what I am talking about.
Click on a block of code to select it. Click outside the code to deselect everything.
Because of the way I used transparency in the demo, inner code blocks are darker than outer code blocks.
This will probably work better for languages which force proper formatting (e.g., Python). I do not know how well this would work with messy code.