JavaScript color extractor