Added basic (still kind of broken) color detection.