I created a new release with a fix. Let me know if it works.
The new version of plugin 1.1.1 doesn’t work properly on my Mac, causing Krita to fail to start and work normally. When I uninstall this plugin, Krita returns to normal.
The specific error code description is as follows:
Exception
Python 3.10.7: /Applications/krita.app/Contents/MacOS/krita
Mon Aug 19 08:48:54 2024
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/toneSettings.py in initializeGL(self=<half_tone_selector.toneSettings.ChromaHueSelector object>)
65
66 vert1 = loadShader(self.context(), shadersDir / ‘lab1.vert’)
67 frag1 = loadShader(self.context(), shadersDir / ‘lab1.frag’)
68 frag2 = loadShader(self.context(), shadersDir / ‘lab2.frag’)
69 self._prog_1 = createProgram(vert1, frag1)
frag1 undefined
global loadShader =
self = <half_tone_selector.toneSettings.ChromaHueSelector object>
self.context =
global shadersDir = PosixPath(‘/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/shaders’)
/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/gl.py in loadShader(context=<PyQt5.QtGui.QOpenGLContext object>, name=PosixPath(‘/Users/snowdream/Library/Application …ta/pykrita/half_tone_selector/shaders/lab1.frag’))
91 includeCode = f.read()
92 tokens[i] = includeCode
93 return createShader(shaderType, versionHeader + ‘’.join(tokens))
94
95 def createProgram(vertexShader: QOpenGLShader, fragmentShader: QOpenGLShader) → QOpenGLShaderProgram:
global createShader =
shaderType = 2
versionHeader = ‘#version 410 core\n’
‘’.join =
tokens = [‘’, ‘const mat3 xy_to_xyz = mat3(\n 1.0, 0.0,-1.0,\n…gb = rgb_to_srgb(clamped_rgb);\n return srgb;\n}’, ‘\n’, ‘float outline(float r, float width, float scale)…\n return outline(dist-radius, width, scale);\n}’, ‘\n\nuniform vec2 u_resolution;\nuniform float u_lig…p_line, 1.0);\n e = ceil(clamp(d, 0.0, 1.0));\n}’]
/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/gl.py in createShader(shaderType=2, code=‘#version 410 core\nconst mat3 xy_to_xyz = mat3(\n …p_line, 1.0);\n e = ceil(clamp(d, 0.0, 1.0));\n}’)
69 shader.compileSourceCode(code)
70 if not shader.isCompiled():
71 raise Exception(shader.log())
72 return shader
73
builtinException = <class ‘Exception’>
shader = <PyQt5.QtGui.QOpenGLShader object>
shader.log =
Exception: ERROR: 0:15: Initializer not allowed
ERROR: 0:20: Use of undeclared identifier ‘coeff_mat’
ERROR: 0:21: Use of undeclared identifier ‘rgb_to_xyz_mat’
ERROR: 0:24: Use of undeclared identifier ‘rgb_to_xyz_mat’
ERROR: 0:27: Use of undeclared identifier ‘xyz_to_rgb_mat’
__cause__ = None
__class__ = <class 'Exception'>
__context__ = None
__delattr__ = <method-wrapper '__delattr__' of Exception object>
__dict__ = {}
__dir__ = <built-in method __dir__ of Exception object>
__doc__ = 'Common base class for all non-exit exceptions.'
__eq__ = <method-wrapper '__eq__' of Exception object>
__format__ = <built-in method __format__ of Exception object>
__ge__ = <method-wrapper '__ge__' of Exception object>
__getattribute__ = <method-wrapper '__getattribute__' of Exception object>
__gt__ = <method-wrapper '__gt__' of Exception object>
__hash__ = <method-wrapper '__hash__' of Exception object>
__init__ = <method-wrapper '__init__' of Exception object>
__init_subclass__ = <built-in method __init_subclass__ of type object>
__le__ = <method-wrapper '__le__' of Exception object>
__lt__ = <method-wrapper '__lt__' of Exception object>
__ne__ = <method-wrapper '__ne__' of Exception object>
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of Exception object>
__reduce_ex__ = <built-in method __reduce_ex__ of Exception object>
__repr__ = <method-wrapper '__repr__' of Exception object>
__setattr__ = <method-wrapper '__setattr__' of Exception object>
__setstate__ = <built-in method __setstate__ of Exception object>
__sizeof__ = <built-in method __sizeof__ of Exception object>
__str__ = <method-wrapper '__str__' of Exception object>
__subclasshook__ = <built-in method __subclasshook__ of type object>
__suppress_context__ = False
__traceback__ = <traceback object>
args = ("ERROR: 0:15: Initializer not allowed\nERROR: 0:20...7: Use of undeclared identifier 'xyz_to_rgb_mat'\n",)
with_traceback = <built-in method with_traceback of Exception object>
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File “/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/toneSettings.py”, line 67, in initializeGL
frag1 = loadShader(self.context(), shadersDir / ‘lab1.frag’)
File “/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/gl.py”, line 93, in loadShader
return createShader(shaderType, versionHeader + ‘’.join(tokens))
File “/Users/snowdream/Library/Application Support/krita/pykrita/half_tone_selector/gl.py”, line 71, in createShader
raise Exception(shader.log())
Exception: ERROR: 0:15: Initializer not allowed
ERROR: 0:20: Use of undeclared identifier ‘coeff_mat’
ERROR: 0:21: Use of undeclared identifier ‘rgb_to_xyz_mat’
ERROR: 0:24: Use of undeclared identifier ‘rgb_to_xyz_mat’
ERROR: 0:27: Use of undeclared identifier ‘xyz_to_rgb_mat’
Sorry about that. Thanks for reporting. Here’s another fix. Release Half Tone Selector v1.1.2 · evnlme/half_tone_selector · GitHub
I don’t know if this 1.1.2 version plugin can work normally on other Mac users, but it has malfunctioned on my computer.I found three abnormal places as follows:
Firstly, the color picker’s position has shifted and is not centered;
Secondly, it is very difficult to use the mouse cursor to select the control points of the foreground and background colors;
Thirdly, when I drag the control points of the foreground or background colors to change their positions, there is a delay and the cursor position is out of sync.
Thank you for your support. The color picker is supposed to automatically resize to fit the available space. When you resize the docker window, does the color picker size update? Do the colors update when you change them?
When I resize the docker window, the color picker size will update. When I change them, the colors will update also.But the three abnormal places I mentioned earlier will still appear.
Here are the screenshots of me adjusting the window to different sizes, which may be helpful to you:
The issue is related to device pixel ratio. High density displays like retina displays may have a ratio greater than 1.0. This explains why the color picker could still update but only filled half the space. This release takes that into account. Release Half Tone Selector v1.1.3 · evnlme/half_tone_selector · GitHub
In the new version 1.1.3, the three exceptions I mentioned earlier have been successfully fixed. However, I found a new imperfection. On the gradient bar of L, when I drag the two control points to the far left and far right, they don’t stop at the ends of the gradient bar, and can even go beyond it, making it impossible for me to see where the control points are. I’m not sure if it’s an operation issue or a bug. Anyway, I’m reporting this discovery to you.
Hello I really liked your addon, I appreciate it.
It is a good tool to build color palettes, and to make quick light and shadow exercises.
Could there be an option to export the colors to the palettes¿?
These are two color exercises I did today with your addon.
Greetings!!!
Thank you!
Right now, I’m working on a lead I have with physical lighting, but I can add the palette export feature to the backlog.
cool, thanks!
Hi, I’m sharing to encourage you and tell you that I’m using your plugin a lot. Also at the moment it would be super convenient for me if the chosen colours could be exported automatically to a colour palette file.
Best regards
FYI It doesn’t export directly into the resources and palette docker. You need to export to file first and then manually import it. This is mostly a limitation of Krita’s API.
Expectacular! I’ll try it tomorrow
works fine!!! thank you !!!
I think I’m very stupid but I installed the plugin and couldn’t find where to use it
i find, i’m realy dumb
I have been using this regularly to do value studies, and it is a godsend. Amazing work, I am astounded by all the quality free tools people create!










