The only way I can find to do this is by using KM's Found Image
-related actions.
This is a screen capture of part of my RapidWeaver app on my Mac:
You'll notice (and it's the same on your screen capture above) that the active container is highlighted in blue. So that's the property I'll use to identify it. The difficulty comes when a different container is active, such as this one:
Why is that difficult? Well, you'll notice that the background colour for each is different, so the means of detecting these must take that into account.
This is the example macro I have come up with:
Test - Click Active Container.kmmacros (23 KB)
Click to see macro
When you download this macro and install it into your own KM app, you'll see that
- It is disabled for your safety, so you'll have to enable it.
- It is in a macro group called
APP - RapidWeaver
so it will only function when RapidWeaver is the active app.
The way this works is it first tries to move the mouse to the active container with the darker background:

If that fails it tries to move the mouse to the active container with the light background:

If either of those is successful it plays a successful sound; if they both fail, a different sound is played. In your use-case you might also have to click the mouse too...
Now this is just an example macro which I've made sure works for me and my system. Your macro would not only have to move the mouse to the active container but it would also have to do other stuff that you require!
The real difficulty comes from the fact that that "light" and "dark" colours come from the background colours I've specifically set for my containers. I can see from your screen capture that the background colours you use are both different and more numerous than mine. So your challenge will be to come up with a way to get round that in KM. I can think of one way: capture the container name itself like this:


and do that for every possible container (name) that RapidWeaver supports and then use a cascading set of KM actions employing the Found Image
condition. To me this sounds both tedious and long-winded but definitely possible. EDIT: but this gives rise to the problem of multiple containers with the same name: how do you distinguish between them?
If only RapidWeaver supported something like AppleScript (which it doesn't).
Anyway, this is food for thought and I hope it gives you some ideas.