change color by type