This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Any plan for adding LCH color selector and LCH blend modes?

Tags: None
(comma "," separated)
sommerluk
Registered Member
Posts
12
Karma
0
OS
What about something like a perceptual color wheel? Wouldn't that helpful?

I've hacked a proof of concept, available at https://github.com/sommerluk/perceptualcolorpickertest (MIT Licence) which provides a (not yet polished) QWidget subclass than can do this. It depends on (only) Qt and incorporates the code from https://github.com/berendeanicolae/ColorSpace to do the actual conversion between sRGB and LCh lab. Screenshot at https://github.com/sommerluk/perceptual ... enshot.png (ignore the sliders at the bottom).

Basically, this assumes an sRGB monitor and exposes a color picker for all RGB colors, but displayed in LCh graphics.

Do you think this is useful? As a standalone application like KColorChooser? Or as library so it can be integrated in other software? Is the UI approach okay?

I'm new to color management and I would like to hear comments. @Elle Stone, you seem to have a lot of experience with this. What do you think about?


Lukas Sommer
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
Yes, it would be useful, but to make it work in Krita, you'd have make sure that the picker uses the display's profile (if one has been set). But there's already code for that in Krita, of course.
sommerluk
Registered Member
Posts
12
Karma
0
OS
Okay, that's great.

In practice, this would also mean to use LittleCMS, right?

I'll give it a try…


Lukas Sommer
sommerluk
Registered Member
Posts
12
Karma
0
OS
Okay. It took some time, but I've made some prograss.

Source code is now at https://github.com/sommerluk/perceptualcolor

Unit test coverage is only partial. The code has much more documentation than before. It compiles to 2 targets:

- A shared library providing all the widget stuff. This contains a widget that display in two dimensions chroma-lightness, a widget that displays in two dimensions a-b (chroma and hue). An LCh based gradient slider. A color wheel. And a dialog widget that has an interface compatible to QColorDialog (except the custom/standard colors).

- A mini app that just displays the color dialog.

It compiles with cmake. It links against lcms2 and QtCore and QtGui and QtWidget.

The general idea is to have at the left a graphical representation of the color space. At the right of the dialog you see the values (RGB, HTML and so on).

In the graphical representation the idea is:
1. Choose a hue
2. On a two-dimensional diagram choose lightness and chroma.

Or alternatively:
1. Choose lightness.
2. On a two-dimensional (a-b) diagram choose hue and chroma.

While changing the first value, the diagram gets continuiously updated. The currently selected color is always in-gamut. If necessairy, chroma is sacrified until it is within gamut.

(I think this is more intuitive than having three sliders, but moving one of them changes the valid ranges for the other two sliders.)

The goal is to have a dialog that can be used by everyone, without needing to understand LCh's theory or even know about it, but a dialog that represents the colors in a more perceptual and nevertheless intuitive way.

Let me hear what you think about this.


Lukas Sommer
sommerluk
Registered Member
Posts
12
Karma
0
OS
Okay. Work on the color picker advances. I've opened a more general thread at viewtopic.php?f=304&t=167261 about how to proceed in development…


Lukas Sommer


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]