# OKLab/OKCLh Perceptual Colour Selector

**URL:** <https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869>\
**Category:** Plugins and Scripts\
**Created:** [March 10, 2025, 12:05pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869 "2025-03-10T12:05:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 10, 2025, 12:05pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/1 "2025-03-10T12:05:51Z")

</div>

Hi all, new here.  
Not really much of an artist but I do enjoy dabbling from time to time. Recently learned about Lab, perceptual colour spaces and OKLab and got interested in the math of colour spaces generally. So I figured I’d give making a colour picker a try.

It’s _very_ rough around the edges but it (mostly) works. For my own purposes it’s more than good enough but I thought I’d post it here and see if anyone thinks it’s useful enough to be worth developing further.

[https://github.com/jasondelaat/oklab-colour-selector-krita-plugin](https://github.com/jasondelaat/oklab-colour-selector-krita-plugin)

Updated:

- Hue slider now displays hues!
- All views now update to the selected colour when using the eye dropper tool. I _think_ this also fixes the error where it was sometimes updating to the wrong colour.
- Removed the link to the zip file since it didn’t seem to auto-import properly. You can download a zip file from github by clicking on the “Code” drop-down and selecting “Download ZIP”. That one seems to install properly.
- Still very much a work in progress.

---

<div class="post-metadata">

**Author:** ![Awez](https://krita-artists.org/user_avatar/krita-artists.org/awez/32/39914_2.png) [@Awez](https://krita-artists.org/u/Awez)\
**Post date:** [March 10, 2025, 3:20pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/2 "2025-03-10T15:20:56Z")

</div>

I’ve been waiting a while for someone to attempt this, great work!

---

<div class="post-metadata">

**Author:** ![sooz](https://krita-artists.org/user_avatar/krita-artists.org/sooz/32/93244_2.png) [@sooz](https://krita-artists.org/u/sooz)\
**Post date:** [March 10, 2025, 5:33pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/3 "2025-03-10T17:33:12Z")

</div>

Thank you for sharing this, @profoundRock .

---

<div class="post-metadata">

**Author:** ![DeaconF](https://krita-artists.org/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@DeaconF](https://krita-artists.org/u/DeaconF)\
**Post date:** [March 12, 2025, 2:59am UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/4 "2025-03-12T02:59:56Z")

</div>

Thank you for this, I’ve been interested in OkLab for Krita for a while now. Unfortunately Krita can’t seem to import it automatically, but adding to pykrita by hand was fine. It works great, I can’t see any issues.

Are you aware Bottosson extended OkLab to OkHSV and OkHSL for pickers like these? It helps reduce the streaks of high chroma hues such as in blues at low luma, and adjusts the luma to be more perceptually uniform. Compare these, for instance:

 ![OKHSL OKLCH Comparison](https://krita-artists.org/uploads/default/original/3X/b/f/bfaf2c95ee8e26e48f506ea14084810b750f151f.png)

They both can do exactly the same stuff, since they are both based on OkLab, but I like the smoothness of OkHSL. You can see the relevant demo and blog post here, which also links to the source code:

> **[Interactive color picker comparison](https://bottosson.github.io/misc/colorpicker/)**

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 12, 2025, 9:11am UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/5 "2025-03-12T09:11:02Z")

</div>

I was not aware but that’s good to know. Thanks for the link I’ll check it out.

I’ll have to see if I can get the import working properly. I renamed some things while working on it, might just be that a file doesn’t have the name Krita expects it to have or something.

---

<div class="post-metadata">

**Author:** ![Oblique](https://krita-artists.org/user_avatar/krita-artists.org/oblique/32/135978_2.png) [@Oblique](https://krita-artists.org/u/Oblique)\
**Post date:** [March 19, 2025, 2:36pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/6 "2025-03-19T14:36:03Z")

</div>

Hello. I got auto importing to work by deleting the macosx subfolder in the zip file. It seemed like krita was trying to use the .desktop file in there instead of the one in the top level. Maybe that’d be fine if I weren’t on windows. Anyway, thanks for the plugin it works great!

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 20, 2025, 6:26pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/7 "2025-03-20T18:26:09Z")

</div>

Oops! I hadn’t realized that I’d left the macosx folder in there. I’ll fix that as soon as I get a chance. Thanks for pointing it out.

---

<div class="post-metadata">

**Author:** ![haonoke](https://krita-artists.org/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@haonoke](https://krita-artists.org/u/haonoke)\
**Post date:** [March 21, 2025, 4:09pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/8 "2025-03-21T16:09:05Z")

</div>

I love this plugin, it works great. One thing I would love to see added is the OKHSL cube from that interactive demo above because I think it balances usefulness with practicality really well, even though triangles are cool too

 ![image](https://krita-artists.org/uploads/default/original/3X/c/a/cafb7ab54f5f0a8d75fe11231510c258495a3cee.png)

---

<div class="post-metadata">

**Author:** ![haonoke](https://krita-artists.org/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@haonoke](https://krita-artists.org/u/haonoke)\
**Post date:** [March 21, 2025, 4:11pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/9 "2025-03-21T16:11:34Z")

</div>

The hue slider not showing any hues is quite difficult to work with though

 ![image](https://krita-artists.org/uploads/default/original/3X/5/5/5552947041c612f84da9eb39299de75c52f757a3.png)

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 21, 2025, 6:49pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/10 "2025-03-21T18:49:59Z")

</div>

I’m glad you like it. I’m looking into the OKHSL and OKHSV. No idea when I’ll actually get around to adding it but I’m sure it’ll happen eventually. As for the hue slider: yeah, totally a pain as it is now. This is the first time I’ve used Qt Widgets and I just used the most basic ones to get a working version up and running but the hue slider is one of the first things I want to fix once I have a bit of time.

---

<div class="post-metadata">

**Author:** ![greenajd](https://krita-artists.org/user_avatar/krita-artists.org/greenajd/32/105331_2.png) [@greenajd](https://krita-artists.org/u/greenajd)\
**Post date:** [March 27, 2025, 9:39am UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/11 "2025-03-27T09:39:10Z")

</div>

Love the plugin! I was wondering if you were planning to make it updatable in real time, that would be very convenient for color mixing :'D

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 28, 2025, 12:42pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/12 "2025-03-28T12:42:53Z")

</div>

Hey thanks!

To answer your question. Maybe?

I’m not sure I understand what you mean by updatable in real time. It should update it’s values when you select a new colour from the canvas with the eye-dropper tool. There’s a bug at the moment which means that doesn’t always work the way it’s supposed to. Someone on github has already suggested a fix I just haven’t had time to look at it yet. Otherwise the sliders are a bit sluggish to respond. That’s an optimisation issue that I’m not sure how to fix yet. Mostly because I haven’t tried yet.

Did you mean something else by “updatable in real time” though? I’m totally open to ideas to make it better and more useful so if you can explain more what exactly you’re looking for I can certainly think about adding it.

---

<div class="post-metadata">

**Author:** ![greenajd](https://krita-artists.org/user_avatar/krita-artists.org/greenajd/32/105331_2.png) [@greenajd](https://krita-artists.org/u/greenajd)\
**Post date:** [March 28, 2025, 2:02pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/13 "2025-03-28T14:02:06Z")

</div>

Thanks for the reply! From what it sounds like it just doesn’t work for me, unfortunately.  
But just in case of a miscommunication ill try to explain better what i mean by: “Updatable in real time”  
I imagine it to be similar to the way Advanced color selector docker updates the color wheel to the current selected color, i hope that makes sense!  
The way it works for me now is that the color wheel is completely unresponsive, but i thought it was a feature xD  
 ![Animation](https://krita-artists.org/uploads/default/original/3X/0/1/01018f7df7e53b9460a60e5e321af8b75c6aaa63.gif)  
I use Windows 11 and Krita 5.3.0 pre-alpha

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [March 28, 2025, 8:21pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/14 "2025-03-28T20:21:31Z")

</div>

Okay, so I wasn’t misunderstanding. Or rather, what I was misunderstanding was my own code! For some reason I wrote it to only check the foreground colour when you switch from one view to another. So it doesn’t update immediately when you select a colour.

If I have some time over the weekend I’ll see if I can fix that. Thanks for pointing it out!

---

<div class="post-metadata">

**Author:** ![greenajd](https://krita-artists.org/user_avatar/krita-artists.org/greenajd/32/105331_2.png) [@greenajd](https://krita-artists.org/u/greenajd)\
**Post date:** [March 28, 2025, 9:22pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/15 "2025-03-28T21:22:45Z")

</div>

No, thank you!!! Im only glad to help! Im super excited to try it out!

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [April 16, 2025, 12:10pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/16 "2025-04-16T12:10:19Z")

</div>

@haonoke just letting you know, hue slider now displays hues!

@greenajd turns out I didn’t have time that weekend but I did finally find some time and it should update properly now on all views.

---

<div class="post-metadata">

**Author:** ![haonoke](https://krita-artists.org/letter_avatar_proxy/v4/letter/h/e9a140/32.png) [@haonoke](https://krita-artists.org/u/haonoke)\
**Post date:** [April 16, 2025, 7:04pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/17 "2025-04-16T19:04:11Z")

</div>

that’s nice, gonna try it out

---

<div class="post-metadata">

**Author:** ![sunless](https://krita-artists.org/user_avatar/krita-artists.org/sunless/32/110889_2.png) [@sunless](https://krita-artists.org/u/sunless)\
**Post date:** [April 18, 2025, 6:47am UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/18 "2025-04-18T06:47:05Z")

</div>

This is so cool and great to visualise the perceptive impact of each colour, which is something I’ve always struggled with. Full saturation yellow is obviously brighter than the most saturated blue, but with typical colour selectors you can’t really tell what  
value is corresponding without experimentation.

I was about to say that I got this error anytime I colour-picked, but it appears to just be incompatibility with Pigment.O:

 ![image](https://krita-artists.org/uploads/default/original/3X/2/8/28583a9114c91d25ecec64ffe8b010ccf028cdea.png)

---

<div class="post-metadata">

**Author:** ![profoundRock](https://krita-artists.org/user_avatar/krita-artists.org/profoundrock/32/234361_2.png) [@profoundRock](https://krita-artists.org/u/profoundRock)\
**Post date:** [April 18, 2025, 12:14pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/19 "2025-04-18T12:14:01Z")

</div>

Thanks, I’m glad you find it interesting/useful. I’ve had a few reports of similar crashes. I _think_ this is just a straight-up bug on my part. I don’t have a ton of experience with qt (the GUI/widget library Krita uses) so I made some guesses as to how some things were supposed to work and I probably guessed wrong in a few cases. I’m working on fixing this so hopefully it’ll stop crashing on people and start being actually useful to more people soon.

---

<div class="post-metadata">

**Author:** ![EyeOdin](https://krita-artists.org/user_avatar/krita-artists.org/eyeodin/32/2662_2.png) [@EyeOdin](https://krita-artists.org/u/EyeOdin)\
**Post date:** [April 18, 2025, 1:08pm UTC](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869/20 "2025-04-18T13:08:51Z")

</div>

Pigmento has a button to turn it off in cases of any conflict, but if there is need for a fix on my end too do say.

[Next page](https://krita-artists.org/t/oklab-okclh-perceptual-colour-selector/117869.md?page=2)
