Add oklab color space, I experimented with some things

I recently tried to add Oklab color space in krita, replacing the original HSV and HSL in krita color picker with Okhsv and Okhsl. Okhsl is similar to HSY, but there is no hue error of HSY and does not depend on photometric coefficient

I also tried to write several new blending modes with Oklch to experiment with the color mixing effect. These results look similar to the spectral mixing of Mypaint, but the conversion only uses RGBToLCH and uses LCH for layer mixing. In order to achieve this color mixing effect in the smear brush, I used this method to realize LCHover and LCHcopy. I really like that, I feel I can say goodbye to the previous muddy color mixing

I really like these results brought by oklab, but I only imitate some of krita’s existing code to write, copy and paste, and then modify some parts, so some places still can’t be changed, such as gradient, mypaint brush, etc

I don’t know if krita will add this color space, but I really hope krita can. I think the effect it brings will be loved by most artists


Looks interesting. I like it! :+1:

1 Like

Oklab can be trusted because photoshop also quoted it. LCH-based color picker and blending mode can also be implemented, because GIMP has it.
But I don’t think it is similar to spectral blending. No unnecessary changes should be made to Mypaint brushes. It may conflict with other parameters .It would be best if someone could implement all the parameters of mypaint2.0
Finally, I don’t think “LCHover” has practical meaning

1 Like

The provided link to Björn Ottosson blog provides detailed explanations about the color space and also he gives mathematics & algorithms

Could help anyone who want to made the implementation



Thank you. I’ll try my best

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.