OCIO and color pickers


Jeremy Selan <jeremy...@...>
 

Yah, it's generally helpful to run the color picker swatch through the display transform.

The simplest solutions I'd recommend is to create an additional color processor (that you hang onto between draw calls) just for you app color pickers.  It will be identical (and track) the one used in the monitor, but should not hook up the channel swizzling, display gain, or display gamma.  (Wouldn't it be weird to view the red channel in the monitor, and have all your color picker UIs go grayscale? :))  And as you mention, once you get the processor you'll use applyRGB on the color value, and use the output color to fill the color swatch.

If you want to do something more complex, such as drawing gradients which are colorspace aware, you'll sometimes need something a bit more involved. But I'll save that for another email... :)  (It involves OCIO::ROLE_COLOR_PICKER).

-- Jeremy



On Fri, Dec 16, 2011 at 9:19 AM, Paul Miller <pa...@...> wrote:
Anyone have any recommendations on how to deal with color pickers and HDR viewing spaces? Right now we just have a normal non-managed picker that tends to never match the actual color picked from the image.

I'm wondering if I should run the picker colors through a CPU version of my display processor during display, or a sub-set of the display operations.

The actual color I store is HDR (ie. when picked off the image) so I'm just talking about being able to preview (and adjust the color with HDR values) at the UI level.


Paul Miller <pa...@...>
 

On 12/16/2011 12:16 PM, Jeremy Selan wrote:
Yah, it's generally helpful to run the color picker swatch through the
display transform.

The simplest solutions I'd recommend is to create an additional color
processor (that you hang onto between draw calls) just for you app color
pickers. It will be identical (and track) the one used in the monitor,
but should not hook up the channel swizzling, display gain, or display
gamma. (Wouldn't it be weird to view the red channel in the monitor,
and have all your color picker UIs go grayscale? :)) And as you
mention, once you get the processor you'll use applyRGB on the color
value, and use the output color to fill the color swatch.

If you want to do something more complex, such as drawing gradients
which are colorspace aware, you'll sometimes need something a bit more
involved. But I'll save that for another email... :) (It involves
OCIO::ROLE_COLOR_PICKER).
Ah yes I forgot about that role. I do actually draw a color hexagon and hue sweep. Right now I just do them by plotting them pixel by pixel. Are you saying ROLE_COLOR_PICKER could come in handy there?