Thank you very much!
This is great! I was thinking of doing something similar to this but got ahead of me. If you could add an RGB slider combo, that would be awesome! I will definitely study your code.
Cheers!
unfortunately, i dont think i will be adding RGB sliders to it as i want to limit the scope to sliders that are cylindrical models thus the name HCL sliders. you can study the code and try implementing your own! not the best coder but hope my code helps!
Hey, about the grayscale support, I also want to report the same type of error happens when selecting a grayscale color on a transparency mask; (and even if the HCL sliders docker is not visible or part of the UI.)
Spotted a bug (?) on Windows 10 Krita version 5.2.2 and HCL version 1.0.2
When selecting a color in Advanced Color Selector (ACS) color on the sliders doesn’t match it at all :0
On the right is the ACS color and on the left the color picked from HCL sliders
The way i did it is:
- Select a color via ACS
- Move either of HCL sliders by one increment and return it to the previous value.
One would expect the color to maybe be slight off but this is a rather large difference.
Thanks for your time!
hi, thanks for the report! i can’t seem to replicate it on my machine(linux mint) but i suspect the culprit being color profile.
may i know what color profile are you using? currently it only works for 4 RGB profiles namely ‘sRGB-elle-V2-srgbtrc.icc’, ‘sRGB-elle-V2-g10.icc’, ‘sRGB built-in’ and ‘krita-2.5, lcms sRGB built-in with linear gamma TRC’.
if not, another possibility may be HCL sliders did not update in time when you select color on ACS and then shift the sliders on HCL. could you record a video for me to see the behaviour of how ACS and HCL interacts on your machine?
Thanks for the reply! I think we found the culprit
Although my image is set to one of the supported color spaces my ACS wasn’t, unchecking this has solved the problem entirely!
Uploaded a new version!
Added background selector mode, you can swap between foreground and background color selector by clicking on the color display panel.
Added spacing between slider groups, default is 6px but you can edit it along with other size parameters in the hclsliders.py file.
Added grayscale support and also disabled updating of sliders for other unsupported models, so should not crash when the color model is not RGBA.
@L.Sumireneko.M @Deevad
please let me know if it still crashes for your operation. cheers!
I updated, tested, and it works very well! Thank you for the grayscale fix. Perfect for transparency mask.
Updated again as i discovered my careless mistake lol.
Forgotten the brackets for a function call when getting colors from krita which causes the sliders values to not update to the correct color.
@Deevad
gonna have to trouble you to update again sorry
No problem! It’s quick and easy. Thank you for the maintenance and the updates about it.
Thank you update for GrayScale color issue fixed,
Also it could smoothly workflow of picking BG/FG colors.
Cheers!
hi, what system and screen resolution are you using? it seems like your one is awfully compressed, the default fixed size 468x230 is based on my linux mint system with screen resolution of the standard 1920x1080.
or perhaps you are using a larger system font size? i notice that the numbers even on the slider itself is much larger than the words in the header, usually they are of similar size.
the solution i have in mind is to list all the various size values as constants on top of the hclsliders.py file for you to have an easier time customizing it to your needs.
thank you, my system is windows, screen size is 2560x1600.
my default system font size is 150%,when i change to 100% ,it does not work.
maybe the screen size is the reason.
alright, locate your hclsliders folder and replace the hclsliders.py file with this.
you should be able to adjust all the sizes in the plugin over here, let me know if it works.
# adjust plugin sizes and update timing here
TIME = 100 # ms time for plugin to update color from krita, faster updates may make krita slower
DELAY = 300 # ms delay updating color history to prevent flooding when using the color picker
DISPLAY_HEIGHT = 25 # px for color display panel at the top
CHANNEL_HEIGHT = 19 # px for channels, also influences hex/ok syntax box and buttons
MODEL_SPACING = 6 # px for spacing between color models
HISTORY_HEIGHT = 16 # px for color history and area of each color box
VALUES_WIDTH = 63 # px for spinboxes containing channel values
LABEL_WIDTH = 11 # px for spacing of channel indicator/letter
# adjust various sizes of config menu
CONFIG_SIZE = (468, 230) # (width in px, height in px) size for config window
SIDEBAR_WIDTH = 76 # px for sidebar containing channel selection and others button
GROUPBOX_HEIGHT = 64 # px for groupboxes of cursor snapping, chroma mode and color history
SPINBOX_WIDTH = 72 # px for spinboxes of interval, displacement and memory
OTHERS_HEIGHT = 12 # px for spacing before color history in others page
Hi, I’m getting this Python error every so often should i be worried?
The Error
TypeError
Python 3.10.7: E:\Speedy\Krita (x64)\bin\krita.exe
Sat Jul 6 19:28: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.
C:\Users\janka\AppData\Roaming\krita\pykrita\hclsliders\hclsliders.py in getKritaColors(self=<hclsliders.hclsliders.HCLSliders object>)
1174 rgb = tuple(foreground.componentsOrdered()[:3])
1175 trc = self.profileTRC(foreground.colorProfile())
1176 self.updateSyntax(rgb, trc)
1177 if trc != self.trc:
1178 rgb = Convert.rgbToTRC(rgb, self.trc)
self = <hclsliders.hclsliders.HCLSliders object>
self.updateSyntax = <bound method HCLSliders.updateSyntax of <hclsliders.hclsliders.HCLSliders object>>
rgb = (0.0, 1.0)
trc = ‘sRGB’
C:\Users\janka\AppData\Roaming\krita\pykrita\hclsliders\hclsliders.py in updateSyntax(self=<hclsliders.hclsliders.HCLSliders object>, rgb=(0.0, 1.0), trc=‘sRGB’)
1603 def updateSyntax(self, rgb: tuple, trc: str):
1604 if self.notation == NOTATION[0]:
1605 self.text = Convert.rgbFToHexS(*rgb, trc)
1606 elif self.notation == NOTATION[1]:
1607 self.text = Convert.rgbFToOklabS(*rgb, trc)
self = <hclsliders.hclsliders.HCLSliders object>
self.text = ‘#000000’
global Convert = <class ‘hclsliders.colorconversion.Convert’>
Convert.rgbFToHexS =
rgb = (0.0, 1.0)
trc = ‘sRGB’
TypeError: Convert.rgbFToHexS() missing 1 required positional argument: ‘trc’
cause = None
class = <class ‘TypeError’>
context = None
delattr = <method-wrapper ‘delattr’ of TypeError object>
dict = {}
dir =
doc = ‘Inappropriate argument type.’
eq = <method-wrapper ‘eq’ of TypeError object>
format =
ge = <method-wrapper ‘ge’ of TypeError object>
getattribute = <method-wrapper ‘getattribute’ of TypeError object>
gt = <method-wrapper ‘gt’ of TypeError object>
hash = <method-wrapper ‘hash’ of TypeError object>
init = <method-wrapper ‘init’ of TypeError object>
init_subclass =
le = <method-wrapper ‘le’ of TypeError object>
lt = <method-wrapper ‘lt’ of TypeError object>
ne = <method-wrapper ‘ne’ of TypeError object>
new =
reduce =
reduce_ex =
repr = <method-wrapper ‘repr’ of TypeError object>
setattr = <method-wrapper ‘setattr’ of TypeError object>
setstate =
sizeof =
str = <method-wrapper ‘str’ of TypeError object>
subclasshook =
suppress_context = False
traceback =
args = (“Convert.rgbFToHexS() missing 1 required positional argument: ‘trc’”,)
with_traceback =
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\janka\AppData\Roaming\krita\pykrita\hclsliders\hclsliders.py”, line 1176, in getKritaColors
self.updateSyntax(rgb, trc)
File “C:\Users\janka\AppData\Roaming\krita\pykrita\hclsliders\hclsliders.py”, line 1605, in updateSyntax
self.text = Convert.rgbFToHexS(*rgb, trc)
TypeError: Convert.rgbFToHexS() missing 1 required positional argument: ‘trc’
Updated the latest release to include size constants for easier adjustment.
@greenajd
it seems like you are using an old version which had problems with grayscale color mode. let me know if it still happens after you get the latest version!
Seems to be all good so far, thanks!