Color, hidpi.

Simple color based on the histo gram, not the algorithm form the paper.
It's hidpi compatible now.
And some refactoring.