Functions for partitioning after a color space transform added