I'm not sure if your colors can be associated with a ranking,
but if they can, maybe the attached could be a first step for you.
I placed the ranking on the Rows shelf and then un-showed the header.
It doesn't have the squares as closely packed anymore, but it at least
groups the like colors.
209889sort.twbx 1.5 MB