more robust color fetching (support for arrays)
more robust color sorting