updated metro color algorithm