util: Utility function to determine the channels that can be written in a color format.