Question
PF_Param_COLOR what is the _exact_ way to associate the RGB values with the correct color space?
When extracting RGB components for a color parameter, the documentation makes no mention of the color space these values are supposed to be in:
The APIs were created before color management was relevant or even computationally sensible, and multiple "coats of paint" are visible in AE’s glorious path to a color managed pipeline.
When Project Settings → Color → Working Space is set to None it is not entirely clear what AE is doing. The app is clearly ingesting media tagged will all kinds of linear/gamma-corrected color spaces, and I'm guessing behind the scenes it must necessarily convert those to a single working color space and whether this has changed from one version to another... I want to believe that in 2022 the anarchy proclaimed by None is unlikely to be true. I doubt AE is simply feeding RGB values straight from the decoding process to the plugin, without care to conform all sources to a single color space or even gamma exponent.
Let’s focus then on when Working Space is set to an actual color space, especially in conjunction with the Linearize Working Space option below it. We can ignore the Blend Colors Using 1.0 Gamma, presumably designed to allow legacy plug-ins (i.e. no color management) that assume a video gamma to be used, while letting AE perform blending in linear RGB for more accurate light computations.
Enabling the Linearize option does seem to alter all RGB information passed ot the plugin, both in terms of image data (frames/textures/layers/buffers/whatever they are called in any given context) and the values associated with color parameters (PF_Param_COLOR). A well behaved plugin can jump through a few AEGP hoops to get the ICC profile data associated with the Working Color Space, and seemingly use that to interpret those RGB values. But in our experience, something isn't quite right. Maybe AE isn't converting all RGB information correctly to the working color space... maybe AE isn't converting RGB values from color parameters the same way image info is... or maybe the assumptions we make in our plugins are just incorrect, so....
Is it reasonable to assume that all RGB values AE asks the plugin to process and produce are in fact expressed in terms of the Working Space set in Project Settings?
For tldr; people: note that RGB values above refers to both image data as well as the RGB values associated with color parameters, discussed above.
Any help from AE engineering is greatly appreciated, and should probably end up in the documentation somewhere.
