Detect color theme change

Fix #186.

It's complicated. But with help from Denis, I think it works now.

We listen to theme change globally in package class so it's easy to handle other commands as well.