The read-only ImageData.colorSpace property is a string indicating the color space of the image data.
ImageData.colorSpace
MDN Reference