Best Practice for Storing Plugin User Configuration in Krita

Hi, I’m looking for guidance on the best place to store user configuration files for a third-party Python plugin in Krita.

Currently, I’m saving the configuration in the same directory as the plugin itself. However, this causes the config to be lost when the plugin is updated. I’m considering two alternatives:

  • Use one of Krita’s standard configuration directories or create a new one like ~/.local/share/krita/pykrita-configs (or platform equivalent), so I can check if a config exists and avoid overwriting it.

  • Dynamically create the config file at runtime if one doesn’t exist. However, I’m unsure if this would be reliable across environments.

I haven’t found much documentation or forum discussion on best practices for this. Any suggestions or links to relevant guidance would be appreciated. Thanks!

You can save it in the kritarc, that is what it is for.
If you have other plugins installed, then you’ll probably find their settings there.

Michelist

1 Like

I would store it away from Krita in it’s own config folder. For most Linux there is ~/.config directory and on Windows its probably %localappdata% or something. This has the advantage of every user of the device/machine being able to have their own config and you don’t have to rely on Krita’s directories existing, since they could change from one version to another without notice. If I’m not mistaken Python has a built in function to get the platform specific path for config directories somewhere in os, so you don’t have to figure this out yourself for every platform. I would not put it in kritarc for the reason of preventing it from getting messed up accidentally.

Many plugins write their config into Krita’s own kritarc, like

Krita.instance().writeSetting("MyPluginConfigGroup", "SettingName", settingValue)
settingValue = Krita.instance().readSetting("MyPluginConfigGroup", "SettingName", defaultValue)

If you want to keep it separate (maybe your plugin has a lot of settings, or you want to use it standalone, or have more control over the configuration format), then you could save the file to the QStandardPaths.writableLocation(QStandardPaths.StandardLocation.GenericConfigLocation) directory (where kritarc is).

1 Like

it won’t do, for single variable it may do but for more complex configurations it does sounds not appropriate

I was thinking of something like this but feels more prone to failures I will have to test it.

ok this sounds generic enough I like it, I will check it out. thanks

Thanks!

At least then it will only affect your plug-in and doesn’t bring the whole application down with it. If you use pythons standard functions, I don’t see why it should be more prone to failure than any of the other methods. But it’s your choice as a developer of course.

It is your plugin, so do what you like, but if you see these two examples, then you may recognize that even huge configurations are stored there. And I can’t tell about any horror-stories connected to them:

[Pigment.O]
analyse_display=False
chan_aaa=False
chan_ard=False
chan_cmy=False
chan_cmyk=False
chan_hcy=False
chan_hex=True
chan_hsl=False
chan_hsv=True
chan_kkk=True
chan_lab=False
chan_lch=False
chan_rgb=False
chan_ryb=False
chan_sele=True
chan_xyy=False
chan_xyz=False
chan_yuv=False
cs_illuminant=D65
cs_luminosity=ITU-R BT.709
cs_matrix=sRGB
disp_labels=True
disp_values=True
dot_1={'active': True, 'hex6': '#edb525', 'aaa_1': 0.7157207843137255, 'rgb_1': 0.9294117647058824, 'rgb_2': 0.7098039215686275, 'rgb_3': 0.1450980392156863, 'uvd_1': -0.19018605979607842, 'uvd_2': 0.6745098061176471, 'uvd_3': 0.5947714660078431, 'cmy_1': 0.07058823529411762, 'cmy_2': 0.2901960784313725, 'cmy_3': 0.8549019607843137, 'cmyk_1': 0.0, 'cmyk_2': 0.23628691983122363, 'cmyk_3': 0.8438818565400843, 'cmyk_4': 0.07058823529411762, 'ryb_1': 0.45010893246187367, 'ryb_2': 0.9294117647058824, 'ryb_3': 0.1450980392156863, 'yuv_1': 0.7157207843137255, 'yuv_2': 0.1924861257285842, 'yuv_3': 0.6356940439371075, 'hue_d': 0.1200000000000001, 'hue_a': 0.22315555555555583, 'hsv_1': 0.1200000000000001, 'hsv_2': 0.8438818565400843, 'hsv_3': 0.9294117647058824, 'hsl_1': 0.1200000000000001, 'hsl_2': 0.8474576271186441, 'hsl_3': 0.5372549019607843, 'hcy_1': 0.1200000000000001, 'hcy_2': 0.7972700494441911, 'hcy_3': 0.7157207843137255, 'ard_1': 0.1200000000000001, 'ard_2': 0.8258064516129033, 'ard_3': 0.5947714660078431, 'xyz_1': 0.5178641092304613, 'xyz_2': 0.5118976223375872, 'xyz_3': 0.0890300791523983, 'xyy_1': 0.4628779941613823, 'xyy_2': 0.45754502082737836, 'xyy_3': 0.5118976223375872, 'lab_1': 0.7679381427058557, 'lab_2': 0.5168095752821258, 'lab_3': 0.8659108666698401, 'lch_1': 0.7679381427058557, 'lch_2': 0.7325935412443627, 'lch_3': 0.242693719631407, 'name': 'Yellow Ochre', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#edb525', 'aaa_d1': 0, 'rgb_d1': 0.9294117647058824, 'rgb_d2': 0.7098039215686275, 'rgb_d3': 0.1450980392156863, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
dot_2={'active': True, 'hex6': '#b72e35', 'aaa_1': 0.29659450980392155, 'rgb_1': 0.7176470588235294, 'rgb_2': 0.1803921568627451, 'rgb_3': 0.20784313725490197, 'uvd_1': -0.465276610572549, 'uvd_2': 0.24117647596078437, 'uvd_3': 0.3686275297607843, 'cmy_1': 0.2823529411764706, 'cmy_2': 0.8196078431372549, 'cmy_3': 0.792156862745098, 'cmyk_1': 0.0, 'cmyk_2': 0.7486338797814207, 'cmyk_3': 0.7103825136612021, 'cmyk_4': 0.2823529411764706, 'ryb_1': 0.7176470588235294, 'ryb_2': 0.1803921568627451, 'ryb_3': 0.20784313725490197, 'yuv_1': 0.29659450980392155, 'yuv_2': 0.4521710645888017, 'yuv_3': 0.7673689033652578, 'hue_d': 0.9914841849148417, 'hue_a': 0.9957420924574208, 'hsv_1': 0.9914841849148417, 'hsv_2': 0.7486338797814207, 'hsv_3': 0.7176470588235294, 'hsl_1': 0.9914841849148417, 'hsl_2': 0.5982532751091703, 'hsl_3': 0.44901960784313727, 'hcy_1': 0.9914841849148417, 'hcy_2': 0.5985915021821012, 'hcy_3': 0.29659450980392155, 'ard_1': 0.9914841849148417, 'ard_2': 0.5527950310559007, 'ard_3': 0.3686275297607843, 'xyz_1': 0.21150420632140637, 'xyz_2': 0.12281543718988663, 'xyz_3': 0.046243717800743434, 'xyy_1': 0.5557660768819705, 'xyy_2': 0.3227200768000002, 'xyy_3': 0.12281543718988663, 'lab_1': 0.41660133301112806, 'lab_2': 0.6089125471105721, 'lab_3': 0.6481728579920941, 'lch_1': 0.41660133301112806, 'lch_2': 0.3677887369871887, 'lch_3': 0.14911870465870652, 'name': 'Cadmium Red', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#b72e35', 'aaa_d1': 0, 'rgb_d1': 0.7176470588235294, 'rgb_d2': 0.1803921568627451, 'rgb_d3': 0.20784313725490197, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
dot_3={'active': True, 'hex6': '#edf0ec', 'aaa_1': 0.9375427450980393, 'rgb_1': 0.9294117647058824, 'rgb_2': 0.9411764705882353, 'rgb_3': 0.9254901960784314, 'uvd_1': 0.01018853891764695, 'uvd_2': 0.009803921450980413, 'uvd_3': 0.9320261470941176, 'cmy_1': 0.07058823529411762, 'cmy_2': 0.05882352941176472, 'cmy_3': 0.07450980392156858, 'cmyk_1': 0.012499999999999956, 'cmyk_2': 0.0, 'cmyk_3': 0.016666666666666607, 'cmyk_4': 0.05882352941176472, 'ryb_1': 0.9254901960784314, 'ryb_2': 0.9411764705882353, 'ryb_3': 0.9372549019607843, 'yuv_1': 0.9375427450980393, 'yuv_2': 0.49350476987518443, 'yuv_3': 0.4948368171246147, 'hue_d': 0.29166666666666663, 'hue_a': 0.4284722222222222, 'hsv_1': 0.29166666666666663, 'hsv_2': 0.016666666666666607, 'hsv_3': 0.9411764705882353, 'hsl_1': 0.29166666666666663, 'hsl_2': 0.11764705882352902, 'hsl_3': 0.9333333333333333, 'hcy_1': 0.29166666666666663, 'hcy_2': 0.058179397988270404, 'hcy_3': 0.9375427450980393, 'ard_1': 0.29166666666666663, 'ard_2': 0.13461538461538558, 'ard_3': 0.9320261470941176, 'xyz_1': 0.8122291371572334, 'xyz_2': 0.863807417052643, 'xyz_3': 0.9173474919754049, 'xyy_1': 0.3131927715650043, 'xyy_2': 0.33308117952034677, 'xyy_3': 0.863807417052643, 'lab_1': 0.94474903824763, 'lab_2': 0.4965875401019908, 'lab_3': 0.5078931211891089, 'lch_1': 0.94474903824763, 'lch_2': 0.017198400467657547, 'lch_3': 0.31494566806491664, 'name': 'Titanium White', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#edf0ec', 'aaa_d1': 0, 'rgb_d1': 0.9294117647058824, 'rgb_d2': 0.9411764705882353, 'rgb_d3': 0.9254901960784314, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
dot_4={'active': True, 'hex6': '#292421', 'aaa_1': 0.1444956862745098, 'rgb_1': 0.1607843137254902, 'rgb_2': 0.1411764705882353, 'rgb_3': 0.12941176470588237, 'uvd_1': -0.016980898196078453, 'uvd_2': 0.02156862764705883, 'uvd_3': 0.14379085680392156, 'cmy_1': 0.8392156862745098, 'cmy_2': 0.8588235294117648, 'cmy_3': 0.8705882352941177, 'cmyk_1': 0.0, 'cmyk_2': 0.1219512195121954, 'cmyk_3': 0.1951219512195122, 'cmyk_4': 0.8392156862745098, 'ryb_1': 0.1607843137254902, 'ryb_2': 0.14823529411764705, 'ryb_3': 0.12941176470588237, 'yuv_1': 0.1444956862745098, 'yuv_2': 0.4918711351753463, 'yuv_3': 0.5103432991179708, 'hue_d': 0.06249999999999989, 'hue_a': 0.10714285714285694, 'hsv_1': 0.06249999999999989, 'hsv_2': 0.19512195121951217, 'hsv_3': 0.1607843137254902, 'hsl_1': 0.06249999999999989, 'hsl_2': 0.1081081081081081, 'hsl_3': 0.1450980392156863, 'hcy_1': 0.06249999999999989, 'hcy_2': 0.10439011680924035, 'hcy_3': 0.1444956862745098, 'ard_1': 0.06249999999999989, 'ard_2': 0.10000000000000002, 'ard_3': 0.14379085680392156, 'xyz_1': 0.018198288299413487, 'xyz_2': 0.01843014147641707, 'xyz_3': 0.01698420112158943, 'xyy_1': 0.3394403146197634, 'xyy_2': 0.3437649144971169, 'xyy_3': 0.01843014147641707, 'lab_1': 0.1464085494750846, 'lab_2': 0.503379495256918, 'lab_3': 0.5142862910595832, 'lch_1': 0.1464085494750846, 'lch_2': 0.02936113760947688, 'lch_3': 0.2130306654561647, 'name': 'Ivory Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#292421', 'aaa_d1': 0, 'rgb_d1': 0.1607843137254902, 'rgb_d2': 0.1411764705882353, 'rgb_d3': 0.12941176470588237, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
dot_dimension=11
dot_edit=False
dot_interpolation=RGB
gamut_mask=None
gamut_profile=[[(0.5, 0.5), (0.5, 0.1), (0.84641, 0.7), (0.15359, 0.7)], [(0.5, 0.5), (0.5, 0.1), (0.9, 0.5), (0.5, 0.9), (0.1, 0.5)], [(0.5, 0.5), (0.5, 0.1), (0.9, 0.5), (0.5, 0.9), (0.1, 0.5)], [(0.5, 0.275), (0.5, 0.1), (0.675, 0.275), (0.5, 0.45), (0.325, 0.275), (0.5, 0.725), (0.5, 0.55), (0.675, 0.725), (0.5, 0.9), (0.325, 0.725)], [(0.5, 0.5), (0.5, 0.15359), (0.8, 0.32679), (0.8, 0.67321), (0.5, 0.84641), (0.2, 0.67321), (0.2, 0.32679)]]
har_01={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
har_02={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0.02916666666666667, 'hue_a': 0.05, 'hsv_1': 0.02916666666666667, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0.02916666666666667, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0.02916666666666667, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0.02916666666666667, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
har_03={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0.05833333333333334, 'hue_a': 0.1, 'hsv_1': 0.05833333333333334, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0.05833333333333334, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0.05833333333333334, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0.05833333333333334, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
har_04={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0.08750000000000001, 'hue_a': 0.15, 'hsv_1': 0.08750000000000001, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0.08750000000000001, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0.08750000000000001, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0.08750000000000001, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
har_05={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0.11066308243727599, 'hue_a': 0.2, 'hsv_1': 0.11066308243727599, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0.11066308243727599, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0.11066308243727599, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0.11066308243727599, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
harmony_edit=False
harmony_index=1
harmony_rule=Analogous
harmony_span=0.2
hex_copy_paste=True
hex_sum=True
hue_shine=True
huecircle_shape=Square
kac={'active': True, 'hex6': '#000000', 'aaa_1': 0.0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0.0, 'cmy_1': 1, 'cmy_2': 1, 'cmy_3': 1, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 1, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0.5, 'yuv_3': 0.5, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0.0, 'hcy_1': 0, 'hcy_2': 0.0, 'hcy_3': 0.0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0.0, 'xyz_1': 0.0, 'xyz_2': 0.0, 'xyz_3': 0.0, 'xyy_1': 0.31272660439158345, 'xyy_2': 0.3290231524027522, 'xyy_3': 0.0, 'lab_1': 0.0, 'lab_2': 0.5, 'lab_3': 0.5, 'lch_1': 0, 'lch_2': 0, 'lch_3': 1, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0.0, 'rgb_d2': 0.0, 'rgb_d3': 0.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
kbc={'active': True, 'hex6': '#6924ff', 'aaa_1': 0.2607105939924717, 'rgb_1': 0.4117647111415863, 'rgb_2': 0.1411764770746231, 'rgb_3': 1.0, 'uvd_1': -0.234336394043135, 'uvd_2': -0.7235294031860129, 'uvd_3': 0.5176468207505032, 'cmy_1': 0.5882352888584137, 'cmy_2': 0.8588235229253769, 'cmy_3': 0.0, 'cmyk_1': 0.5882352888584137, 'cmyk_2': 0.8588235229253769, 'cmyk_3': 0.0, 'cmyk_4': 0.0, 'ryb_1': 0.4117647111415863, 'ryb_2': 0.1411764770746231, 'ryb_3': 1.0, 'yuv_1': 0.2607105939924717, 'yuv_2': 0.8984098976113, 'yuv_3': 0.5959195562288002, 'hue_d': 0.7191780823502343, 'hue_a': 0.8120243532654925, 'hsv_1': 0.7191780823502343, 'hsv_2': 0.8588235229253769, 'hsv_3': 1.0, 'hsl_1': 0.7191780823502343, 'hsl_2': 1.0, 'hsl_3': 0.5705882385373116, 'hcy_1': 0.7191780823502343, 'hcy_2': 1.0, 'hcy_3': 0.2607105939924717, 'ard_1': 0.7191780823502343, 'ard_2': 1, 'ard_3': 0.5176468207505032, 'xyz_1': 0.24501079187438188, 'xyz_2': 0.11483455816860776, 'xyz_3': 0.9551380504246755, 'xyy_1': 0.18632234580850635, 'xyy_2': 0.08732776256169288, 'xyy_3': 0.11483455816860776, 'lab_1': 0.40383087927093625, 'lab_2': 0.6503663916334733, 'lab_3': 0.028789102696798796, 'lch_1': 0.40383087927093625, 'lch_2': 0.9892416519135435, 'lch_3': 0.7991617042841148, 'name': '', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#6924ff', 'aaa_d1': 0, 'rgb_d1': 0.4117647111415863, 'rgb_d2': 0.1411764770746231, 'rgb_d3': 1.0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}
key_1_chan=[KEY 1]
key_1_factor=1
key_2_chan=[KEY 2]
key_2_factor=1
key_3_chan=[KEY 3]
key_3_factor=1
key_4_chan=[KEY 4]
key_4_factor=1
krange={'aaa_1': 255, 'rgb_1': 255, 'rgb_2': 255, 'rgb_3': 255, 'uvd_1': 255, 'uvd_2': 255, 'uvd_3': 360, 'cmy_1': 255, 'cmy_2': 255, 'cmy_3': 255, 'cmyk_1': 255, 'cmyk_2': 255, 'cmyk_3': 255, 'cmyk_4': 255, 'ryb_1': 255, 'ryb_2': 255, 'ryb_3': 255, 'yuv_1': 255, 'yuv_2': 255, 'yuv_3': 255, 'hsv_1': 360, 'hsv_2': 255, 'hsv_3': 255, 'hsl_1': 360, 'hsl_2': 255, 'hsl_3': 255, 'hcy_1': 360, 'hcy_2': 255, 'hcy_3': 255, 'ard_1': 360, 'ard_2': 255, 'ard_3': 255, 'xyz_1': 255, 'xyz_2': 255, 'xyz_3': 255, 'xyy_1': 255, 'xyy_2': 255, 'xyy_3': 255, 'lab_1': 256, 'lab_2': 256, 'lab_3': 256, 'lch_1': 255, 'lch_2': 255, 'lch_3': 255}
mask_edit=False
mask_set=C:\\Users\\ALPHA\\AppData\\Roaming\\krita\\pykrita\\pigment_o\\MASK\\SPHERE
mixer_colors=[{'l': {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, 'm': 0, 'r': {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}}]
mixer_space=HSV
panel_index=Hue
performance_inaccurate=False
performance_release=False
pin_cor=[{'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}, {'active': False, 'hex6': '#000000', 'aaa_1': 0, 'rgb_1': 0, 'rgb_2': 0, 'rgb_3': 0, 'uvd_1': 0, 'uvd_2': 0, 'uvd_3': 0, 'cmy_1': 0, 'cmy_2': 0, 'cmy_3': 0, 'cmyk_1': 0, 'cmyk_2': 0, 'cmyk_3': 0, 'cmyk_4': 0, 'ryb_1': 0, 'ryb_2': 0, 'ryb_3': 0, 'yuv_1': 0, 'yuv_2': 0, 'yuv_3': 0, 'hue_d': 0, 'hue_a': 0, 'hsv_1': 0, 'hsv_2': 0, 'hsv_3': 0, 'hsl_1': 0, 'hsl_2': 0, 'hsl_3': 0, 'hcy_1': 0, 'hcy_2': 0, 'hcy_3': 0, 'ard_1': 0, 'ard_2': 0, 'ard_3': 0, 'xyz_1': 0, 'xyz_2': 0, 'xyz_3': 0, 'xyy_1': 0, 'xyy_2': 0, 'xyy_3': 0, 'lab_1': 0, 'lab_2': 0, 'lab_3': 0, 'lch_1': 0, 'lch_2': 0, 'lch_3': 0, 'name': 'Black', 'kkk_percent': 0.5, 'kkk_scale': 6500, 'hex6_d': '#000000', 'aaa_d1': 0, 'rgb_d1': 0, 'rgb_d2': 0, 'rgb_d3': 0, 'cmyk_d1': 0, 'cmyk_d2': 0, 'cmyk_d3': 0, 'cmyk_d4': 0, 'yuv_d1': 0, 'yuv_d2': 0, 'yuv_d3': 0, 'xyz_d1': 0, 'xyz_d2': 0, 'xyz_d3': 0, 'lab_d1': 0, 'lab_d2': 0, 'lab_d3': 0}]
sample_edit=False
sample_limit=300
sample_mode=RGB
sele_mode=XYZ
stops={'aaa_1': 4, 'rgb_1': 4, 'rgb_2': 4, 'rgb_3': 4, 'uvd_1': 4, 'uvd_2': 4, 'uvd_3': 4, 'cmy_1': 4, 'cmy_2': 4, 'cmy_3': 4, 'cmyk_1': 4, 'cmyk_2': 4, 'cmyk_3': 4, 'cmyk_4': 4, 'ryb_1': 4, 'ryb_2': 4, 'ryb_3': 4, 'yuv_1': 4, 'yuv_2': 4, 'yuv_3': 4, 'hsv_1': 6, 'hsv_2': 4, 'hsv_3': 4, 'hsl_1': 6, 'hsl_2': 4, 'hsl_3': 4, 'hcy_1': 6, 'hcy_2': 4, 'hcy_3': 4, 'ard_1': 6, 'ard_2': 4, 'ard_3': 6, 'xyz_1': 4, 'xyz_2': 4, 'xyz_3': 4, 'xyy_1': 4, 'xyy_2': 4, 'xyy_3': 4, 'lab_1': 4, 'lab_2': 4, 'lab_3': 4, 'lch_1': 4, 'lch_2': 4, 'lch_3': 6, 'kkk_1': 4, 'mixer': 2}
ui_channel=True
ui_harmony=False
ui_history=False
ui_mixer=False
ui_pin=False
wheel_mode=ANALOG
wheel_space=HSV

Oops, message too long, next example below. ↓

Michelist

Part 2:

ABActuatorPlugin-settings={"sequences": [{"name": "Triple-Icon-Exporter", "icon": "17646b48-0812-4a61-8a90-b0ee8a07c6ec.svg", "actions": [{"name": "file_export_file", "title": "KRA [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}, {"name": "edit_paste", "title": "PNG [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}, {"name": "file_export_file", "title": "ICO [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}], "id": "390c7d75-0703-408b-897c-a208e41e9f0a"}, {"name": "Make 6 copies of current layer", "icon": "dd0ccda0-144f-4dfb-a605-4f4e5b2b5c08.svg", "actions": [{"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}], "id": "6dd08b33-ce6d-464f-a0b4-97e26b3310b0"}, {"name": "Make 6 copies of current layer & toggle ALPHA LOCK", "icon": "dd0ccda0-144f-4dfb-a605-4f4e5b2b5c08.svg", "actions": [{"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "toggle_layer_alpha_lock", "title": "Toggle layer alpha [toggle_layer_alpha_lock]"}], "id": "5ea75b2b-e986-4d0d-9076-66a7a4892ff4"}, {"name": "[AM] Triple-Icon-Exporter", "icon": "17646b48-0812-4a61-8a90-b0ee8a07c6ec.svg", "actions": [{"name": "file_export_file", "title": "KRA [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}, {"name": "edit_paste", "title": "PNG [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}, {"name": "file_export_file", "title": "ICO [file_export_file]"}, {"name": "edit_paste", "title": "Paste [edit_paste]"}], "id": "96f1ccf8-cc24-4142-8c5c-17285a6d550b"}, {"name": "[AM] Make 5 Copies of current Layer", "icon": "35abd792-86ee-446c-ac5a-9928c3e964d6.svg", "actions": [{"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}, {"name": "duplicatelayer", "title": "Duplicate Layer or Mask [duplicatelayer]"}], "id": "d83819e1-3bd8-4c0f-8e7c-28e0caf3098f"}, {"name": "[AB] Activate Custom Transform", "icon": "aef5a054-2a97-4f2e-81c0-b845310d44a3.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from PyQt5.QtWidgets import QApplication, QToolButton\\n\\n\\nfrom krita import Krita\\n\\n\\ntransforms = {\\n    \\"Free\\": \\"freeTransformButton\\",\\n    \\"Perspective\\": \\"perspectiveTransformButton\\",\\n    \\"Warp\\": \\"warpButton\\",\\n    \\"Cage\\": \\"cageButton\\",\\n    \\"Liquify\\": \\"liquifyButton\\",\\n    \\"Mesh\\": \\"meshButton\\",\\n}\\n\\n\\n\\ndef activate_specific_transform(name: str):\\n    \\"\\"\\"\\n    name: The name of the tranform.\\n    \\"\\"\\"\\n    app = Krita.instance()\\n    qwin = app.activeWindow().qwindow()\\n\\n\\n    app.action(\\"KisToolTransform\\").trigger()\\n    QApplication.processEvents()\\n\\n\\n    button: QToolButton = qwin.findChild(QToolButton, name)\\n    button.click()\\n\\n\\n# Free, Perspective, Warp, Cage, Liquify, Mesh\\nactivate_specific_transform(transforms[\\"Mesh\\"])\\n\\n"}], "id": "4ec681a0-7946-4f9a-b174-e17cbf924ecf"}, {"name": "[AB] Paint and Select", "icon": "view_zoom_in", "actions": [{"name": "duplicatelayer", "title": "Duplicate Layer or Mask"}, {"name": "flatten_layer", "title": "Flatten Layer [flatten_layer]"}, {"name": "krita_filter_desaturate", "title": "Desaturate..."}, {"name": "convert_to_selection_mask", "title": "Convert to Selection Mask [convert_to_selection_mask]"}], "id": "f12697b2-8db9-4857-bacf-16b338ab3e1a"}, {"name": "[AB] Trim To Layer Content", "icon": "zoom_to_100pct", "actions": [{"name": "selectopaque", "title": "Select Opaque (Replace) [selectopaque]"}, {"name": "resizeimagetoselection", "title": "Trim to Selection [resizeimagetoselection]"}, {"name": "deselect", "title": "Deselect [deselect]"}], "id": "9a5b89f2-d2b4-4b9d-9978-74a575f7447b"}, {"name": "[AB] Expand To Layers Content", "icon": "838142a2-639e-4acf-b915-1f27747872c8.svg", "actions": [{"name": "new_from_visible", "title": "New Layer From Visible [new_from_visible]"}, {"name": "selectopaque", "title": "Select Opaque (Replace) [selectopaque]"}, {"name": "resizeimagetoselection", "title": "Trim to Selection [resizeimagetoselection]"}, {"name": "deselect", "title": "Deselect [deselect]"}, {"name": "remove_layer", "title": "Remove Layer [remove_layer]"}], "id": "3b344800-9142-4e05-ab2d-c28ed3c765f6"}, {"name": "[AB] Layer Into a Mask", "icon": "8ba7a945-fa93-4c02-ad73-37a8fe897fea.svg", "actions": [{"name": "duplicatelayer", "title": "Duplicate Layer or Mask", "lower": "duplicate layer or mask"}, {"name": "krita_filter_desaturate", "title": "Desaturate...", "lower": "desaturate..."}, {"name": "convert_to_selection_mask", "title": "to Selection Mask", "lower": "to selection mask"}], "id": "63df4f64-546f-476c-bb95-f61a99fbd994"}, {"name": "[AB] Celan Canvas", "icon": "e48aa9f8-de80-4b84-930f-0714b8570eeb.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from krita import Krita\\ndef clean_canvas():\\n    app = Krita.instance()\\n    doc = app.activeDocument()\\n    doc.crop(0, 0, doc.width(), doc.height())\\n    doc.refreshProjection()\\nclean_canvas()"}], "id": "8238892c-7095-4b81-89c5-64574a755b17"}, {"name": "[AB] Expand Image to Layers Content", "icon": "9dde4811-2e22-45ff-8591-bb63cb657015.svg", "actions": [{"name": "new_from_visible", "title": "New Layer From Visible [new_from_visible]"}, {"name": "selectopaque", "title": "Select Opaque (Replace) [selectopaque]"}, {"name": "resizeimagetoselection", "title": "Trim to Selection [resizeimagetoselection]"}, {"name": "deselect", "title": "Deselect [deselect]"}, {"name": "remove_layer", "title": "Remove Layer [remove_layer]"}], "id": "48db5937-e017-48fc-8986-4974d6dfb50f"}, {"name": "[AB] Line Tools Cycle", "icon": "674a939d-abd1-40f5-be50-2d412e8d69ab.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from krita import Krita\\nfrom actuator.api.utils import state\\n\\nactions = [\\n    'KritaShape/KisToolLine',\\n    'KritaShape/KisToolRectangle',\\n    'KritaShape/KisToolEllipse',\\n    'KisToolPolygon',\\n    'KisToolPolyline',\\n]\\n    \\ni = state.get(\\"tool index\\", 0)\\naction_name = actions[min(i, len(actions) - 1)]\\n\\nKrita.instance().action(action_name).trigger()\\n\\nprint(action_name)\\ni = (i + 1) % len(actions)\\nstate[\\"tool index\\"] = i"}], "id": "58221853-c533-4858-ad88-fede5701a0eb"}, {"name": "[AB] Merge Keep Blending Mode", "icon": "72ea7567-43e7-4b5b-b447-b89d3de070d4.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Step 1 [ABActuatorScriptStep]", "script": "from krita import Krita, Node\\nfrom actuator.api.utils import state\\nfrom actuator.apicandidate.utils import hopeful_wait\\n\\ndoc = Krita.instance().activeDocument()\\nnode: Node = doc.activeNode()\\nbm = node.blendingMode()\\nstate[\\"blending-mode\\"] = bm\\nnode.mergeDown()"}, {"name": "ABActuatorScriptStep", "title": "Step 2 [ABActuatorScriptStep]", "script": "from krita import Krita, Node\\nfrom actuator.api.utils import state\\nfrom actuator.apicandidate.utils import hopeful_wait\\n\\ndoc = Krita.instance().activeDocument()\\nnode: Node = doc.activeNode()\\nbm = state[\\"blending-mode\\"]\\nnode.setBlendingMode(bm)"}], "id": "d97af45f-306f-4736-9a8a-fdb06e1be489"}, {"name": "[AB] Mirror Copy", "icon": "27c3a7ef-61f0-4130-a560-86d058ee7927.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from PyQt5.QtCore import QPoint\\n\\nfrom krita import Krita\\n\\napp = Krita.instance()\\n\\ndef run():\\n    doc = app.activeDocument()\\n    if not doc:\\n        return\\n\\n    app.action('edit_copy').trigger()\\n    app.action('edit_paste').trigger()\\n    doc.waitForDone()\\n\\n    active_layer = doc.activeNode()\\n    bounds = active_layer.bounds()\\n    x, y, w, h = bounds.x(), bounds.y(), bounds.width(), bounds.height()\\n    center = QPoint(x + w, y)\\n\\n    active_layer.scaleNode(center, -w, h, \\"Hermite\\")\\n    \\nrun()"}, {"name": "move_layer_down", "title": "Move Layer or Mask Down [move_layer_down]"}], "id": "5c7af220-4eb5-45e0-bc96-4a45b7b3bb55"}, {"name": "[AB] Multilayer Blend Mode", "icon": "a1a85f29-d659-412f-985a-6c38a1c4f02d.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from functools import partial\\n\\nfrom PyQt5 import QtWidgets, QtGui\\nfrom PyQt5.QtCore import Qt, qDebug\\n\\nfrom krita import Krita\\n\\n\\nBLENDING_MODES = [\\n    \\"normal\\",\\n    \\"erase\\",\\n    \\"in\\",\\n    \\"out\\",\\n    \\"alphadarken\\",\\n    \\"destination-in\\",\\n    \\"destination-atop\\",\\n    #\\n    \\"xor\\",\\n    \\"or\\",\\n    \\"and\\",\\n    \\"nand\\",\\n    \\"nor\\",\\n    \\"xnor\\",\\n    \\"implication\\",\\n    \\"not_implication\\",\\n    \\"converse\\",\\n    \\"not_converse\\",\\n    #\\n    \\"plus\\",\\n    \\"minus\\",\\n    \\"add\\",\\n    \\"subtract\\",\\n    \\"inverse_subtract\\",\\n    \\"diff\\",\\n    \\"multiply\\",\\n    \\"divide\\",\\n    \\"arc_tangent\\",\\n    \\"geometric_mean\\",\\n    \\"additive_subtractive\\",\\n    \\"negation\\",\\n    #\\n    \\"modulo\\",\\n    \\"modulo_continuous\\",\\n    \\"divisive_modulo\\",\\n    \\"divisive_modulo_continuous\\",\\n    \\"modulo_shift\\",\\n    \\"modulo_shift_continuous\\",\\n    #\\n    \\"equivalence\\",\\n    \\"allanon\\",\\n    \\"parallel\\",\\n    \\"grain_merge\\",\\n    \\"grain_extract\\",\\n    \\"exclusion\\",\\n    \\"hard mix\\",\\n    \\"hard_mix_photoshop\\",\\n    \\"hard_mix_softer_photoshop\\",\\n    \\"overlay\\",\\n    \\"behind\\",\\n    \\"greater\\",\\n    \\"hard overlay\\",\\n    \\"interpolation\\",\\n    \\"interpolation 2x\\",\\n    \\"penumbra a\\",\\n    \\"penumbra b\\",\\n    \\"penumbra c\\",\\n    \\"penumbra d\\",\\n    #\\n    \\"darken\\",\\n    \\"burn\\",  # this is also known as 'color burn'.\\n    \\"linear_burn\\",\\n    \\"gamma_dark\\",\\n    \\"shade_ifs_illusions\\",\\n    \\"fog_darken_ifs_illusions\\",\\n    \\"easy burn\\",\\n    #\\n    \\"lighten\\",\\n    \\"dodge\\",\\n    \\"linear_dodge\\",\\n    \\"screen\\",\\n    \\"hard_light\\",\\n    \\"soft_light_ifs_illusions\\",\\n    \\"soft_light_pegtop_delphi\\",\\n    \\"soft_light\\",\\n    \\"soft_light_svg\\",\\n    \\"gamma_light\\",\\n    \\"gamma_illumination\\",\\n    \\"vivid_light\\",\\n    \\"flat_light\\",\\n    \\"linear light\\",\\n    \\"pin_light\\",\\n    \\"pnorm_a\\",\\n    \\"pnorm_b\\",\\n    \\"super_light\\",\\n    \\"tint_ifs_illusions\\",\\n    \\"fog_lighten_ifs_illusions\\",\\n    \\"easy dodge\\",\\n    \\"luminosity_sai\\",\\n    #\\n    \\"hue\\",\\n    \\"color\\",\\n    \\"saturation\\",\\n    \\"inc_saturation\\",\\n    \\"dec_saturation\\",\\n    \\"luminize\\",\\n    \\"inc_luminosity\\",\\n    \\"dec_luminosity\\",\\n    #\\n    \\"hue_hsv\\",\\n    \\"color_hsv\\",\\n    \\"saturation_hsv\\",\\n    \\"inc_saturation_hsv\\",\\n    \\"dec_saturation_hsv\\",\\n    \\"value\\",\\n    \\"inc_value\\",\\n    \\"dec_value\\",\\n    #\\n    \\"hue_hsl\\",\\n    \\"color_hsl\\",\\n    \\"saturation_hsl\\",\\n    \\"inc_saturation_hsl\\",\\n    \\"dec_saturation_hsl\\",\\n    \\"lightness\\",\\n    \\"inc_lightness\\",\\n    \\"dec_lightness\\",\\n    #\\n    \\"hue_hsi\\",\\n    \\"color_hsi\\",\\n    \\"saturation_hsi\\",\\n    \\"inc_saturation_hsi\\",\\n    \\"dec_saturation_hsi\\",\\n    \\"intensity\\",\\n    \\"inc_intensity\\",\\n    \\"dec_intensity\\",\\n    #\\n    \\"copy\\",\\n    \\"copy_red\\",\\n    \\"copy_green\\",\\n    \\"copy_blue\\",\\n    \\"tangent_normalmap\\",\\n    #\\n    \\"colorize\\",\\n    \\"bumpmap\\",\\n    \\"combine_normal\\",\\n    \\"clear\\",\\n    \\"dissolve\\",\\n    \\"displace\\",\\n    \\"nocomposition\\",\\n    #  \\"pass through\\", // XXX: not implemented anywhere yet\\n    \\"darker color\\",\\n    \\"lighter color\\",\\n    \\"undefined\\",\\n    #\\n    \\"reflect\\",\\n    \\"glow\\",\\n    \\"freeze\\",\\n    \\"heat\\",\\n    \\"glow_heat\\",\\n    \\"heat_glow\\",\\n    \\"reflect_freeze\\",\\n    \\"freeze_reflect\\",\\n    \\"heat_glow_freeze_reflect_hybrid\\",\\n]\\n\\n\\ndef set_blending_mode(mode):\\n    if mode not in BLENDING_MODES:\\n        QtWidgets.QMessageBox.warning(\\n            None, \\"Warning\\", f'Unknown blending mode: \\"{mode}\\"'\\n        )\\n        return\\n\\n    win = Krita.instance().activeWindow()\\n    view = win.activeView()\\n    selected_nodes = view.selectedNodes()\\n    for s in selected_nodes:\\n        s.setBlendingMode(mode)\\n\\nset_blending_mode(\\"multiply\\")"}], "id": "03352bd5-5968-42fb-b2ab-32ae62d69e1d"}, {"name": "[AB] New View", "icon": "3681d888-2a2a-4c02-a428-4534f4310d03.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from PyQt5 import QtTest\\nfrom krita import Krita\\n\\nfrom PyQt5.QtWidgets import QApplication\\n\\ndef run():\\n    app = Krita.instance()\\n\\n    doc = app.activeDocument()\\n    if doc is None:\\n        return\\n    new_window = app.openWindow()\\n    new_window.qwindow().show()\\n    new_window.addView(doc)\\n    doc.waitForDone()\\n    QtTest.QTest.qWait(1000)\\n\\n    windows = app.windows()\\n\\n    print(QApplication.screens())\\n    screens = QApplication.screens()\\n    \\n    SCREEN_NO = 2\\n    \\n    if len(screens) == 2:\\n        screen = screens[SCREEN_NO - 1]\\n        print(screen)\\n\\n        qr = screen.geometry()\\n        win = windows[1]\\n        win.qwindow().move(qr.left(), qr.top())\\n        win.qwindow().show()\\n        \\n    app.action(\\"view_show_canvas_only\\").trigger()\\n    QtTest.QTest.qWait(1000)\\n\\nrun()\\n\\nfrom PyQt5 import QtTest\\nfrom PyQt5.QtCore import qDebug\\nimport krita\\nfrom krita import Krita\\nimport time\\n\\nimport ctypes\\nfrom ctypes import wintypes\\n\\nuser32 = ctypes.WinDLL('user32', use_last_error=True)\\n\\nINPUT_MOUSE    = 0\\nINPUT_KEYBOARD = 1\\nINPUT_HARDWARE = 2\\n\\nKEYEVENTF_EXTENDEDKEY = 0x0001\\nKEYEVENTF_KEYUP       = 0x0002\\nKEYEVENTF_UNICODE     = 0x0004\\nKEYEVENTF_SCANCODE    = 0x0008\\n\\nMAPVK_VK_TO_VSC = 0\\n\\n# msdn.microsoft.com/en-us/library/dd375731\\nVK_TAB    = 0x09\\nVK_MENU   = 0x12\\nVK_LWIN   = 0x5B\\nVK_LSHIFT = 0xA0\\nVK_LEFT   = 0x25\\nVK_UP     = 0x26\\nVK_RIGHT  = 0x27\\nVK_DOWN   = 0x28\\nVK_TAB = 0x09\\n\\n# C struct definitions\\n\\nwintypes.ULONG_PTR = wintypes.WPARAM\\n\\nclass MOUSEINPUT(ctypes.Structure):\\n    _fields_ = ((\\"dx\\",          wintypes.LONG),\\n                (\\"dy\\",          wintypes.LONG),\\n                (\\"mouseData\\",   wintypes.DWORD),\\n                (\\"dwFlags\\",     wintypes.DWORD),\\n                (\\"time\\",        wintypes.DWORD),\\n                (\\"dwExtraInfo\\", wintypes.ULONG_PTR))\\n\\nclass KEYBDINPUT(ctypes.Structure):\\n    _fields_ = ((\\"wVk\\",         wintypes.WORD),\\n                (\\"wScan\\",       wintypes.WORD),\\n                (\\"dwFlags\\",     wintypes.DWORD),\\n                (\\"time\\",        wintypes.DWORD),\\n                (\\"dwExtraInfo\\", wintypes.ULONG_PTR))\\n\\n    def __init__(self, *args, **kwds):\\n        super(KEYBDINPUT, self).__init__(*args, **kwds)\\n        # some programs use the scan code even if KEYEVENTF_SCANCODE\\n        # isn't set in dwFflags, so attempt to map the correct code.\\n        if not self.dwFlags & KEYEVENTF_UNICODE:\\n            self.wScan = user32.MapVirtualKeyExW(self.wVk,\\n                                                 MAPVK_VK_TO_VSC, 0)\\n\\nclass HARDWAREINPUT(ctypes.Structure):\\n    _fields_ = ((\\"uMsg\\",    wintypes.DWORD),\\n                (\\"wParamL\\", wintypes.WORD),\\n                (\\"wParamH\\", wintypes.WORD))\\n\\nclass INPUT(ctypes.Structure):\\n    class _INPUT(ctypes.Union):\\n        _fields_ = ((\\"ki\\", KEYBDINPUT),\\n                    (\\"mi\\", MOUSEINPUT),\\n                    (\\"hi\\", HARDWAREINPUT))\\n    _anonymous_ = (\\"_input\\",)\\n    _fields_ = ((\\"type\\",   wintypes.DWORD),\\n                (\\"_input\\", _INPUT))\\n\\nLPINPUT = ctypes.POINTER(INPUT)\\n\\ndef _check_count(result, func, args):\\n    if result == 0:\\n        raise ctypes.WinError(ctypes.get_last_error())\\n    return args\\n\\nuser32.SendInput.errcheck = _check_count\\nuser32.SendInput.argtypes = (wintypes.UINT, # nInputs\\n                             LPINPUT,       # pInputs\\n                             ctypes.c_int)  # cbSize\\n\\n# Functions\\n\\ndef PressKey(hexKeyCode):\\n    x = INPUT(type=INPUT_KEYBOARD,\\n              ki=KEYBDINPUT(wVk=hexKeyCode))\\n    user32.SendInput(1, ctypes.byref(x), ctypes.sizeof(x))\\n\\ndef ReleaseKey(hexKeyCode):\\n    x = INPUT(type=INPUT_KEYBOARD,\\n              ki=KEYBDINPUT(wVk=hexKeyCode,\\n                            dwFlags=KEYEVENTF_KEYUP))\\n    user32.SendInput(1, ctypes.byref(x), ctypes.sizeof(x))\\n\\n\\n# Win+Left\\ndef shortcut():\\n    wait_time = 100 # ms\\n    qDebug(f\\"Wait time: {wait_time}\\")\\n    PressKey(VK_LWIN)\\n    QtTest.QTest.qWait(wait_time)\\n    PressKey(VK_LEFT)\\n    QtTest.QTest.qWait(wait_time)\\n    ReleaseKey(VK_LEFT)\\n    QtTest.QTest.qWait(wait_time)\\n    ReleaseKey(VK_LWIN)\\n\\nqDebug(\\"Engage shortcut\\")\\nshortcut()"}], "id": "05aa906a-a131-4b98-8e2d-4432e1cf2071"}, {"name": "[AB] Set a Zoom", "icon": "2bd80952-e566-47ed-ba84-6dde8a6a29ad.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from krita import Krita\\n\\nlevel = 450\\n\\napp = Krita.instance()\\nwindow = app.activeWindow()\\nview = window.activeView()\\ncanvas = view.canvas()\\n\\nprint(canvas)\\nprint(canvas.zoomLevel())\\n\\ncanvas.setZoomLevel(level / 100)\\nprint(canvas.zoomLevel())"}], "id": "4bbb4ef0-32c1-4804-9961-e94c6447593d"}, {"name": "[AB] Toggle Brushes", "icon": "529fa13f-a4ac-4358-85ad-14d960b9b831.svg", "actions": [{"name": "ABActuatorScriptStep", "title": "Custom Script [ABActuatorScriptStep]", "script": "from krita import Krita\\n\\nall_presets = Krita.instance().resources('preset')\\n\\nBRUSH_ONE = \\"f) Charcoal Rock Soft\\"\\nBRUSH_TWO = \\"b) Basic-5 Size\\"\\n\\ncurrentView = Krita.instance().activeWindow().activeView()\\nactive_brush = currentView.currentBrushPreset().name()\\n\\nif active_brush == BRUSH_ONE:\\n    new_brush = BRUSH_TWO\\nelse:\\n    new_brush = BRUSH_ONE\\n\\ncurrentView.setCurrentBrushPreset(all_presets[new_brush])"}], "id": "8db1c057-d331-4531-a43d-7dffec6d5f2e"}, {"name": "[AB] Trim Image to Layer Content", "icon": "2fac7adc-7546-4ded-83f3-b07bde199b3b.svg", "actions": [{"name": "selectopaque", "title": "Select Opaque (Replace) [selectopaque]"}, {"name": "resizeimagetoselection", "title": "Trim to Selection [resizeimagetoselection]"}, {"name": "deselect", "title": "Deselect [deselect]"}], "id": "b665c931-c756-4d67-b740-e473cb8da713"}], "groups": {"items": [{"name": "original", "icon": "b4a1594c-3a32-44db-911f-a90a909a1333.svg", "sequences": ["4ec681a0-7946-4f9a-b174-e17cbf924ecf", "f12697b2-8db9-4857-bacf-16b338ab3e1a", "9a5b89f2-d2b4-4b9d-9978-74a575f7447b", "3b344800-9142-4e05-ab2d-c28ed3c765f6", "58221853-c533-4858-ad88-fede5701a0eb", "d97af45f-306f-4736-9a8a-fdb06e1be489", "5c7af220-4eb5-45e0-bc96-4a45b7b3bb55", "63df4f64-546f-476c-bb95-f61a99fbd994", "8238892c-7095-4b81-89c5-64574a755b17", "48db5937-e017-48fc-8986-4974d6dfb50f", "03352bd5-5968-42fb-b2ab-32ae62d69e1d", "05aa906a-a131-4b98-8e2d-4432e1cf2071", "4bbb4ef0-32c1-4804-9961-e94c6447593d", "8db1c057-d331-4531-a43d-7dffec6d5f2e", "b665c931-c756-4d67-b740-e473cb8da713"]}, {"name": "my", "icon": "cd727c17-94c0-4f78-9bec-97b7bd6d9fad.svg", "sequences": ["390c7d75-0703-408b-897c-a208e41e9f0a", "6dd08b33-ce6d-464f-a0b4-97e26b3310b0", "5ea75b2b-e986-4d0d-9076-66a7a4892ff4", "96f1ccf8-cc24-4142-8c5c-17285a6d550b", "d83819e1-3bd8-4c0f-8e7c-28e0caf3098f"]}, {"name": "everything", "icon": "f0af312e-c8ec-45e8-909b-dcc30e7345b5.svg", "sequences": ["390c7d75-0703-408b-897c-a208e41e9f0a", "6dd08b33-ce6d-464f-a0b4-97e26b3310b0", "5ea75b2b-e986-4d0d-9076-66a7a4892ff4", "96f1ccf8-cc24-4142-8c5c-17285a6d550b", "d83819e1-3bd8-4c0f-8e7c-28e0caf3098f", "4ec681a0-7946-4f9a-b174-e17cbf924ecf", "f12697b2-8db9-4857-bacf-16b338ab3e1a", "9a5b89f2-d2b4-4b9d-9978-74a575f7447b", "3b344800-9142-4e05-ab2d-c28ed3c765f6", "63df4f64-546f-476c-bb95-f61a99fbd994", "8238892c-7095-4b81-89c5-64574a755b17", "48db5937-e017-48fc-8986-4974d6dfb50f", "58221853-c533-4858-ad88-fede5701a0eb", "d97af45f-306f-4736-9a8a-fdb06e1be489", "5c7af220-4eb5-45e0-bc96-4a45b7b3bb55", "03352bd5-5968-42fb-b2ab-32ae62d69e1d", "05aa906a-a131-4b98-8e2d-4432e1cf2071", "4bbb4ef0-32c1-4804-9961-e94c6447593d", "8db1c057-d331-4531-a43d-7dffec6d5f2e", "b665c931-c756-4d67-b740-e473cb8da713"]}], "active": 2}}

And that were only two examples of many.

Michelist

I think Kritarc is the best option. If not just create a file at the plugins current location and use that as your new kritarc, and this will work regardless of the os. Now saving files in other folders that is not of the plugins location sounds weird.

You can check out the config library I wrote for my Shortcut Composer plugin:

It stores the configuration inside kritarc, but as a library user you operate on python classes instead of the file itself. It covers things like parsing basic types of parameters, handles resetting to default or notifying about config changes. You also get a bunch of ui widgets that work with those config objects. Here is a short example that stores one integer parameter in kritarc and creates a spinbox widget, which allows the krita user to modify it from GUI (the spinbox is not displayed anywhere though):

from .config_system import Field
from .config_system.ui import SpinBox

field = Field("My_plugin_settings", "some_string_param", 1)

field.read()  # Returns 1
field.write(2)  # Store new value
field.read()  # Returns 2
field.reset_default()  # Resets to default value of 1


def my_callback():
    print("value changed!")


field.register_callback(my_callback)  # from now on, each change runs callback


spinbox = SpinBox(
    field,
    pretty_name="My first string param",
    tooltip="Message displayed when hovering over the Spinbox",
    step=5,
    max_value=100)
spinbox.widget  # Access the QWidget Spinbox object
spinbox.read()  # Returns value of Spinbox (can be different than saved one)
spinbox.save()  # Saves spinbox value to the config field
spinbox.reset()  # Sets the spinbox to current config value

This code is under GPL license, so you can copy the whole config_system folder into your plugin and use it as is. The classes are documented in docstrings inside the code, so you may need to read those if you decide to use the library.

1 Like