Imaging API colorSpace


First off, it’s super exciting to see the Imaging API coming out of its beta stage. It’s an exciting feature that enables us to do much more than was possible e.g. in extendScript. That said I’m gonna bring up a comment/feedback again that I had brought up earlier. It concerns the term ‘colorSpace’ as used in a number of the API’s methods to access and label pixel data. Personally I think it’s a bad naming choice for the following reasons:

  • The thing that ‘colorSpace’ refers to is actually the color model (or in Photoshop terms ‘mode’). They are not the same thing. In color science a color model refers to a way to represent color as a tuple of coordinates, such as RGB, LAB, CMYK, etc. A color space on the other hand refers to how the coordinate values relate to the corresponding model’s primaries. E.g. Linear RGB or sRGB refer to different spaces for the RGB color model.

  • It’s inconsistent with other parts of Photoshop, e.g. the UI under Image > Mode as well as the naming in the file psd/psb file spec…

  • The choice is also different from other non-Adobe software and APIs, which use the term color space in its color science sense (e.g. OpenColorIO to only name one).

  • The thing that actually identifies the color space in a color science sense in the API’s case is named ‘colorProfile’. However, a profile is a term specific to the choice of ICC as color management system.

By now you probably think I’m super nit-picky. Sure. But here’s why this matters: I think it’s generally not the best idea to name something by what it isn’t in an interface, because sometimes in the future you may need that name to refer to the right thing.

Just as another side note. Photoshop already allows the option to not color manage a document. Which I think is a use-case that’s not well represented by the API currently (as a hint for a feature request). I totally understand that at this stage the API is meant to cover a broad audience and majority of use-cases. Just please don’t make any choices that make the other use-cases impossible/cumbersome.

I’d be happy to elaborate on this :slight_smile: …otherwise I’m done :grimacing:.


FYI this did get passed along to the Photoshop engineering team.

I fully second @dotproduct 's comments - as a colour management guy I also think that it’s super important to conform to standard nomenclature in general, but even more so within such a specific and prescribed area like colour management.
Sure, it’ll be hidden behind my UI, but it makes for a torrid developer experience.

1 Like