This is one of the most useful expressions in my tool kit. Sample a colour from another layer. 1. Add a fill effects to the layer you want to effect. 2. add expression to the fill colour.
In this example I've set the pixel sampling to 10x10 pixels, but you can change this to any dimension.
To see a real work example of this check out this piece on my website: Secure Anchorage. This involved many layers and a whole lot of rendering and pre-rendering.