Pigment.O plugin

So your plugin didn’t really solve my shortcut issue from that Krita praising thread. I follwed the advice of @hulmanen, but every time at some pont the sliders get stuck eventually. Often adjusting h,l,v,s or whatever will change other parameters while doing it with hotkeys.

It doesn’t really bother me all too much though. At least now I have pigmento installed. It is pretty awesome. I guess my favourite feature by far is the COTD option. I am planning on doing at least a little sketch with exclusively those each day. Looking forward to the thumbnail view of that folder.

edit_: today’s colours were pretty awful. I hope you don’t pick them by hand every day :slight_smile:

@ogonek
I think I see what you mean and there is kindda no way of stopping it in real time. it is the reason my first attempts to do it failed. there are some ways to by pass this thought but not that practical:

  1. use pigmento in P>K mode, but it will never read what is on the canvas.
  2. hover your mouse over the Pigmento docker and then use the shortcuts.

Glad you liked COTD. And it is purely random, the same date on your computer will always result on the same colors presented there. I have no interference over it really it is generated by the seed of the date your on.

Outstanding work so far!

I noticed the ARD picker changes shape depending on hue (Or angle, I suppose.), do you think it’d be possible to add similar behavior to other triangle pickers, based on perceived luminance?
I played around with the ARD picker code a bit and was able to get the triangle to change shape like that, but I’m not familiar enough with python or Krita plugin development to implement it as a separate picker with all the functionality (Only the displayed triangle changes, the picked color is still using the values it did before I messed with the code.).

Untitled (1)

The ARD is a literal cut on the RGB cube, so the triangle changes shape with the angle of the color inside.

As for the Luma. I would probably opt for a square perhaps.

Report an error, which occurred in the 8.20 version. I don’t know if the current version is fixed, if yes, please ignore
This error occurred when I used “x” to swap the foreground and background colors, and then it appeared every time I opened krita

IndexError
Python 3.8.1: C:\GAMES\STEAM\steamapps\common\Krita\krita\bin\krita.exe
Wed Sep 15 17:09:52 2021

A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.

 C:\Users\123\AppData\Roaming\krita\pykrita\pigment_o\pigment_o_docker.py in Krita_2_Pigment(self=<pigment_o.pigment_o_docker.PigmentODocker object>)
 8139                     kbc1 = bg_comp_order[0]
 8140                     kbc2 = bg_comp_order[1]
 8141                     kbc3 = bg_comp_order[2]
 8142                     # Verify conditions to change Pigment
 8143                     if (self.rgb_1 != kac1 or self.rgb_2 != kac2 or self.rgb_3 != kac3 or self.d_cm != d_cm):
kbc3 undefined
bg_comp_order = [0.5333333611488342, 1.0]
IndexError: list index out of range
    __cause__ = None
    __class__ = <class 'IndexError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of IndexError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of IndexError object>
    __doc__ = 'Sequence index out of range.'
    __eq__ = <method-wrapper '__eq__' of IndexError object>
    __format__ = <built-in method __format__ of IndexError object>
    __ge__ = <method-wrapper '__ge__' of IndexError object>
    __getattribute__ = <method-wrapper '__getattribute__' of IndexError object>
    __gt__ = <method-wrapper '__gt__' of IndexError object>
    __hash__ = <method-wrapper '__hash__' of IndexError object>
    __init__ = <method-wrapper '__init__' of IndexError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of IndexError object>
    __lt__ = <method-wrapper '__lt__' of IndexError object>
    __ne__ = <method-wrapper '__ne__' of IndexError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of IndexError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of IndexError object>
    __repr__ = <method-wrapper '__repr__' of IndexError object>
    __setattr__ = <method-wrapper '__setattr__' of IndexError object>
    __setstate__ = <built-in method __setstate__ of IndexError object>
    __sizeof__ = <built-in method __sizeof__ of IndexError object>
    __str__ = <method-wrapper '__str__' of IndexError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    args = ('list index out of range',)
    with_traceback = <built-in method with_traceback of IndexError object>

The above is a description of an error in a Python program.  Here is
the original traceback:

Traceback (most recent call last):
  File "C:\Users\123\AppData\Roaming\krita\pykrita\pigment_o\pigment_o_docker.py", line 8141, in Krita_2_Pigment
    kbc3 = bg_comp_order[2]
IndexError: list index out of range

Go to the kritarc file and delete all entries from the pigmento header in order to reset it and free up Krita from the bad memory.

But how did you trigger this? We’re you in a gray scale document when you swapped?

Did you copy the whole error message? Seems a bit short.

I can’t remember clearly, it seems to be on a filter mask

only have these

I don’t know why it became normal again just now … :sweat_smile:

Updated some bug fixes all around but not everything I detected sadly (lab and kelvin).
Gonna work more later but basically avoid lab documents with Pigmento for now the formula is still iffy has a 1 point decrepency.

As for now I fixed:

  • HCY formula is reverted to old behavior due to miss match to hue and luma. So i will break compatibility to krita HSY as it will bring stability as it was really unstable with conversions not to mention gave bad results all over
  • value floor on other colors spaces
  • color paths details
  • hex codes on other colors spaces

Features:
added more RGB colors spaces when converting from XYZ, note that most of them only work in D50(paper) so if your on D65 (for monitors and standard) and you select one that does not have D65 you will shift to D50 automatically.


There is still 2 more methods missing that I dont know if I should place “NTSC RGB” and “CIE RGB” because they exist in E and C illuminants. I don’t know how strange that would be for people.

@TheTwo
for this last bug you were on a XYZ document and inside a filter. check the updated version it should not crash under that situation now.

1 Like

No, I never know what xyz does, and there is a serious lag on the xyz file (not due to the plug-in), I can definitely find it right away

As for now, I am quite happy with how it works. If my colours ever get stuck, I just pick the last usable one.

One thing that irks me:
Whenever I press one of the inc/dec value keys, the colour is stored in history. It would be nice if they’d only appear there if I have actually used them.

my COTD folder is growing. Right now I try to use them as is. But it is a challenge. Maybe I will rethink my rules next month.

Thanks again for putting this out. Is there a manual btw?

1 Like

I cant do that without doing very dodgy stuff. I was hopping my proposal for that would gain some traction. Python - User Activity Versus Inactivity Timer

I am really happy you have been enjoying it. I had planned that to make an event but I am not sure how well that would be accepted without a catchy name.

the manual is at Settings > Configure Krita > Python Plugin Manager > Click Pigmento to see the manual below it.

1 Like

@EyeOdin Hi, I’d just like to ask if there’s some way to remove the written values on the right while keeping descriptors on the left (RGB HSL) and if there’s a way to get rid of the “transparent”/checker line below the main color line?

Not a big deal I just like to only have things that Ireally need for drawing for clarity ;0.

obrazek

No there isn’t.

What you have is the “values” option that eliminates the label and the values on the left and right at the same time. it works under the assumption you know what you using already and you don’t need to see the label or the value all the time so it maximizes the space available so you can click.

As for the bottom percentual ruler, also no. it is there so the top percentual ruler can have a reference for the bottom sliders too, it also not that big it is like 5 pixels.

Personally I don’t see much gain in hide sections of it. it would mean at least 3 or 4 buttons all to do parts of the same thing, it would be too many redundant buttons for just the channels. I do try to make things simple for the User with presets and for the UI saving system and I already have so much around.

Oki, btw the 5 px line i think we are talking about something else here, I meant the lane with #b52d48 in the picture.
No problem, I was just checking if I could just quickly modify some values in the script files to remove it not looking for a patch on this ;).

Thanks.

well if you feel okay in doing it you can:
1.1) go to def Adjust_Spacing(self): inside you will find 2 if's you want to adjust the first one.
1.2) “Style Sheet” is the graphical look of them, “Dimension Top” and “Dimension Bot” adjust that section vertically.
2.1) go to def Menu_Value(self): (this is what value button triggers) there you will only find one if.
2.2) adjust the values in HEX you want there to influence that section horizontally

I suggest opening the UI file pigment_o_docker.ui so you know what is the element name you want to alter, I don’t destroy anything just shift them around.

I am working on a thing to select complementary colors fast. but I am unsure if I should do everything or just one with the best results. what say you?

I have an idea. Can you add an option to keep the background color displayed?
image
Sometimes, on a layer such as a fill layer. I want to see its foreground/background color. But it is gray on the color picker that comes with krita
image

That was the original behavior but the background color clashes with the Panel’s color below it disrupting a clear read of the foreground color. Like complementary colors make an extra shock to the eyes.

I made the background Color for pigmento to read the gradient better because I use Fg and Bg alot also and the gradient windows are weak.

The hide helps to balance both out.

For me personally this is not a problem. If the workload is not too heavy, I would still like to have a “BG display” option to let people choose for themselves …

everyone is affected by color relativity unless you have some issue with your eyes.
In case you want to read about the phenomenon.

if you search you will even find the work of a person that made a series of works to analyze the phenomena but I forgot the artists name.

the Krita theme is also a factor but tends to be more neutral than the background color that can be very active and cause more issues. BG color is not used all the time either way, ussually pickers have it in display always and you never even use it.