Fixed sort before qunatize to color