Pigment is the new name of what was KritaColor in the good old 1.6 days. With some improvements, like a cleaner API, and more shared source code, mostly thanks to templates (in 1.6, more than 60% of the code was duplicated, either directly in the library or in the various plugins).
One of the biggest drawback was color conversion. KritaColor was created to abstract color, in such way that filters, tools or any other algorithms in Krita didn’t have to care about the color space of an image. And in fact, it was first conceived around the lcms library, which is a color management library which handles ICC color space, that means RGB, CMYK, LAB, grayscale,… in integer 8bit or 16bit. But Krita also supports High-Dynamic Range color space, which are mostly floating points color space in 16bit or 32bit. And unfortunately in KritaColor, when a color space was not handled by lcms, colors were first convert to LAB/Integer 16bit, but that meant losing High-Dynamic Range information, as for those color space a lot of important information is stored near 0.0 or above 1.0, information lost when converting to an integer color space, not counting the conversion from 32bit to 16bit.
But I want Krita 2(.0) to be a reliable, high quality, extra, super, cool, (put here any other positive term) High-Dynamic Range imaging application. And thanks to the introduction, during the last few week, of the Color Conversion System (CCS), it’s now possible to have reliable color conversion between two High-Dynamic Range color spaces. And that’s cool, because one of the main task in the High-Dynamic Range work flow is to convert to Low-Dynamic Range (a process called tonemapping), but most algorithms to accomplish that task use the XYZ color space, while most images are in RGB, that means that the image first need to be converted to XYZ (and now you understand why it is interesting to keep the High-Dynamic Range information).
I can’t really make a screen shot of color conversion, so to prove that I can make boring and obscure illustration, here is the graph of direct color conversion in pigment:
The annoyance is that you can’t expect author of a color space to provide a color conversion for each other color spaces. So there must be a mechanism to create a link of color conversion from one color space to an other one. So the main task of the Color Conversion System is to create the graph of possible color conversion, and to use it to find the best color conversion.