Beginning to write primary color detector via median cut.