I need to do some colorspace transformation for a new feature I’m working on, but color theory is not really my thing, and I want to make sure I’m doing it right.
What I need to do is to transform from/to the colorspace a given module is working on.
Right now darktable have:
raw until demosaic
rgb until colorin
lab until colorout
rgb again
I’m using dt_sRGB_to_XYZ() / dt_XYZ_to_Lab <-> dt_Lab_to_XYZ() / dt_XYZ_to_sRGB() [1]
but as the code says, linear sRGB → gamma corrected sRGB, probably this is not the right way to do it.
Any help on this will be appreciated.
[1] darktable/colorspaces_inline_conversions.h at master · darktable-org/darktable · GitHub
darktable/colorspaces_inline_conversions.h at master · darktable-org/darktable · GitHub