Improved Panel View logic
Margin color detection tweaks